tele_number_utils 1.0.10 → 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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,7 +15,7 @@ Handles tricky scenarios like **shared country codes** (e.g., +1, +44, +7) and *
15
15
  - +672 → Australian territories
16
16
 
17
17
  - Format phone numbers **dynamically** with custom group sizes and separators:
18
- - Separators: space (` `), dash (`-`), slash (`/`), parentheses (`()`)
18
+ - Separators: space (` `), dash (`-`), parentheses (`()`)
19
19
 
20
20
  - Fully **TypeScript-ready** with types and interfaces
21
21
  - Minimal **dependency-free** footprint
@@ -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")); // "123 456 7890"
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], "-")); // "1234-5678-9012-345"
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], "()")); // "(123) 456 7890"
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tele_number_utils",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",