tele_number_utils 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,13 +78,13 @@ interface Country {
|
|
|
78
78
|
import { formatter } from "tele_number_utils";
|
|
79
79
|
|
|
80
80
|
// Default grouping [3,3,4]
|
|
81
|
-
console.log(formatter("1234567890")); // "+1 2345 67890"
|
|
81
|
+
console.log(formatter("+1234567890")); // "+1 2345 67890"
|
|
82
82
|
|
|
83
83
|
// Custom grouping with dash separator
|
|
84
|
-
console.log(formatter("123456789012345", [4, 4, 4, 4], "-")); // "+1 2345-6789-0123-45"
|
|
84
|
+
console.log(formatter("+123456789012345", [4, 4, 4, 4], "-")); // "+1 2345-6789-0123-45"
|
|
85
85
|
|
|
86
86
|
// Parentheses style
|
|
87
|
-
console.log(formatter("1234567890", [3, 3, 4], "()")); // "(+1) 2345 678 90"
|
|
87
|
+
console.log(formatter("+1234567890", [3, 3, 4], "()")); // "(+1) 2345 678 90"
|
|
88
88
|
|
|
89
89
|
// Short numbers <= 6 digits remain unchanged
|
|
90
90
|
console.log(formatter("12345")); // "12345"
|