tele_number_utils 1.0.12 → 1.0.14

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.
Files changed (2) hide show
  1. package/README.md +16 -2
  2. 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("+12345678901")); // "+1 234 567 8901"
82
82
 
83
83
  // Custom grouping with dash separator
84
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("+12345678901", [3, 3, 4], "()")); // "(+1) 234 567 8901"
88
88
 
89
89
  // Short numbers <= 6 digits remain unchanged
90
90
  console.log(formatter("12345")); // "12345"
@@ -185,6 +185,20 @@ Formats digits into **custom groups**.
185
185
 
186
186
  ---
187
187
 
188
+ ```ts
189
+ import { country_list } from "tele_number_utils";
190
+
191
+ console.log(country_list[0]);
192
+ /*
193
+ {
194
+ name: "United States",
195
+ dialingCode: "1",
196
+ flagUrl: "https://flagcdn.com/us.svg",
197
+ alphaTwoCode: "US"
198
+ }
199
+ */
200
+ ```
201
+
188
202
  ## Contributing
189
203
 
190
204
  Feel free to open an issue or PR to improve country detection, formatting options, or add more NANPA countries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tele_number_utils",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",