@philotheephilix/phone-number-circle-locator 2.0.1 → 2.1.0

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 (3) hide show
  1. package/README.md +24 -34
  2. package/dist/data.json +6810 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # @philotheephilix/phone-number-circle-locator
1
+ # phone-circle-locator
2
2
 
3
3
  Look up Indian mobile phone numbers to find the **telecom circle** (region) and **operator**.
4
4
 
5
- Covers 2,576 four-digit prefixes across all major Indian carriers including Airtel, Vodafone, Idea, BSNL, Jio, Tata Docomo, Aircel, and more.
5
+ Covers 1,702 four-digit prefixes across all major Indian carriers including Airtel, Reliance Jio, Vodafone Idea, and BSNL.
6
6
 
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- npm install @philotheephilix/phone-number-circle-locator
10
+ npm install phone-circle-locator
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -15,31 +15,31 @@ npm install @philotheephilix/phone-number-circle-locator
15
15
  ### JavaScript
16
16
 
17
17
  ```js
18
- const { lookup, getCircle, getOperator } = require("@philotheephilix/phone-number-circle-locator");
18
+ const { lookup, getCircle, getOperator } = require("phone-circle-locator");
19
19
 
20
20
  const result = lookup("+91 9900 123456");
21
21
  console.log(result);
22
22
  // {
23
23
  // phone: "9900123456",
24
24
  // prefix: "9900",
25
- // operator: "AIRTEL",
26
- // circle: "KARNATAKA"
25
+ // operator: "Airtel",
26
+ // circle: "Karnataka"
27
27
  // }
28
28
 
29
- getCircle("9910123456"); // "DELHI"
30
- getOperator("9910123456"); // "AIRTEL"
29
+ getCircle("9910123456"); // "Delhi"
30
+ getOperator("9910123456"); // "Airtel"
31
31
  ```
32
32
 
33
33
  ### TypeScript
34
34
 
35
35
  ```ts
36
- import { lookup, getCircle, getOperator, LookupResult } from "@philotheephilix/phone-number-circle-locator";
36
+ import { lookup, getCircle, getOperator, LookupResult } from "phone-circle-locator";
37
37
 
38
38
  const result: LookupResult | null = lookup("+91 9900 123456");
39
39
 
40
40
  if (result) {
41
- console.log(result.circle); // "KARNATAKA"
42
- console.log(result.operator); // "AIRTEL"
41
+ console.log(result.circle); // "Karnataka"
42
+ console.log(result.operator); // "Airtel"
43
43
  }
44
44
  ```
45
45
 
@@ -68,9 +68,8 @@ interface LookupResult {
68
68
  Returns just the telecom circle name, or `null` if not found.
69
69
 
70
70
  ```js
71
- getCircle("9900123456"); // "KARNATAKA"
72
- getCircle("9910123456"); // "DELHI"
73
- getCircle("9820123456"); // "MUMBAI"
71
+ getCircle("9900123456"); // "Karnataka"
72
+ getCircle("9910123456"); // "Delhi"
74
73
  ```
75
74
 
76
75
  ### `getOperator(phone: string | number): string | null`
@@ -78,8 +77,8 @@ getCircle("9820123456"); // "MUMBAI"
78
77
  Returns just the operator name, or `null` if not found.
79
78
 
80
79
  ```js
81
- getOperator("9900123456"); // "AIRTEL"
82
- getOperator("9920123456"); // "VODAFONE"
80
+ getOperator("9900123456"); // "Airtel"
81
+ getOperator("9920123456"); // "Vodafone Idea"
83
82
  getOperator("9414098765"); // "BSNL"
84
83
  ```
85
84
 
@@ -99,26 +98,17 @@ The following phone number formats are all supported:
99
98
 
100
99
  ## Supported Operators
101
100
 
102
- | Operator | Coverage |
103
- |---|---|
104
- | AIRTEL | Pan India |
105
- | VODAFONE | Pan India |
106
- | IDEA | Pan India |
107
- | BSNL | Pan India |
108
- | RELIANCE | Multiple circles |
109
- | TATA DOCOMO | Multiple circles |
110
- | AIRCEL | Multiple circles |
111
- | MTNL | Delhi, Mumbai |
112
- | UNINOR | Multiple circles |
113
- | MTS | Multiple circles |
114
- | LOOP MOBILE | Mumbai |
115
- | VIDEOCON | Multiple circles |
101
+ | Operator |
102
+ |---|
103
+ | Airtel |
104
+ | Reliance Jio |
105
+ | Vodafone Idea |
106
+ | BSNL |
107
+ | Aircel |
116
108
 
117
109
  ## Telecom Circles
118
110
 
119
- The following circles are covered:
120
-
121
- Andhra Pradesh, Assam, Bihar & Jharkhand, Chennai, Delhi, Gujarat, Haryana, Himachal Pradesh, Jammu & Kashmir, Karnataka, Kerala, Kolkata, Madhya Pradesh & Chhatisgarh, Maharashtra, Mumbai, North East, Odisha, Punjab, Rajasthan, Tamilnadu, Uttar Pradesh (E), Uttar Pradesh (W) & Uttarakhand, West Bengal
111
+ Andhra Pradesh, Assam, Bihar & Jharkhand, Delhi, Gujarat, Haryana, Himachal Pradesh, Jammu & Kashmir, Karnataka, Kerala, Madhya Pradesh & Chhattisgarh, Maharashtra & Goa, North East, Odisha, Punjab, Rajasthan, Tamil Nadu, UP East, UP West & Uttarakhand, Uttar Pradesh, West Bengal
122
112
 
123
113
  ## Development
124
114
 
@@ -135,7 +125,7 @@ npm test
135
125
 
136
126
  ## Data Source
137
127
 
138
- Phone prefix data sourced from [IndiaMobileNumbers](https://github.com/BaseMax/IndiaMobileNumbers).
128
+ Phone prefix data sourced from [in-mob-prefix](https://github.com/hstsethi/in-mob-prefix) by [@hstsethi](https://github.com/hstsethi).
139
129
 
140
130
  ## License
141
131