@yext/phonenumber-util 0.2.3 → 0.2.4

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/.husky/pre-commit CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  npx lint-staged
5
5
  npm run format
6
- npx vitest run --coverage
6
+ TZ=America/Los_Angeles npx vitest run --coverage
7
7
  npm run make-badges
8
8
  npx generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Utility for extracting and validating phone numbers. Extracts an array of phone numbers from an inputted string, validates that these numbers appear genuine and provide data about those phone numbers.
2
2
 
3
- [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat)
3
+ [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
4
+ [![Install from NPM](https://img.shields.io/badge/npm-@yext/phonenumber--util-blue)](https://www.npmjs.com/package/@yext/phonenumber-util)
5
+ ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat)
6
+ ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat)
7
+ ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat)
8
+ ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat)
4
9
 
5
10
  ### Scripts
6
11
 
@@ -38,6 +43,12 @@ npx vitest run --coverage
38
43
 
39
44
  The returned object will include a `rawNumber` value. This value is the return of the exact value passed to the function. No sanitization occurs with this value. If you reference this number, ensure you sanitize it _BEFORE_ passing to this function.
40
45
 
46
+ ### Install
47
+
48
+ ```bash
49
+ npm i @yext/phonenumber-util --save
50
+ ```
51
+
41
52
  ### Usage
42
53
 
43
54
  There is additional functionality exposed as `export`, but the primary expected use case is:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yext/phonenumber-util",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "author": "bajohnson@hearsaycorp.com",
5
5
  "license": "BSD-3-Clause",
6
6
  "description": "Utility for extracting and validating phone numbers",
@@ -26,14 +26,14 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@eslint/js": "^9.7.0",
29
- "@vitest/coverage-v8": "^2.1.5",
30
- "eslint": "^9.15.0",
29
+ "@vitest/coverage-v8": "^2.1.8",
30
+ "eslint": "^9.17.0",
31
31
  "generate-license-file": "^3.6.0",
32
- "globals": "^15.12.0",
32
+ "globals": "^15.14.0",
33
33
  "husky": "^9.1.7",
34
34
  "istanbul-badges-readme": "^1.9.0",
35
- "lint-staged": "^15.2.10",
36
- "prettier": "^3.3.3",
35
+ "lint-staged": "^15.2.11",
36
+ "prettier": "^3.4.2",
37
37
  "vitest": "^2.1.1"
38
38
  },
39
39
  "eslintConfig": {},
@@ -26,6 +26,7 @@ export const AREA_CODE_LIST = [
26
26
  '224',
27
27
  '225',
28
28
  '226',
29
+ '227',
29
30
  '257',
30
31
  '228',
31
32
  '229',
@@ -352,6 +353,7 @@ export const AREA_CODE_LIST = [
352
353
  '839',
353
354
  '840',
354
355
  '843',
356
+ '844',
355
357
  '845',
356
358
  '847',
357
359
  '848',
package/src/phoneCodes.js CHANGED
@@ -6,6 +6,7 @@ export const AREA_CODES = {
6
6
  // Toll Free / Not Geographic
7
7
  800: { name: 'Toll-free', region: { name: 'United States', code: 'US' } },
8
8
  833: { name: 'Toll-free', region: { name: 'United States', code: 'US' } },
9
+ 844: { name: 'Toll-free', region: { name: 'United States', code: 'US' } },
9
10
  888: { name: 'Toll-free', region: { name: 'United States', code: 'US' } },
10
11
  877: { name: 'Toll-free', region: { name: 'United States', code: 'US' } },
11
12
  866: { name: 'Toll-free', region: { name: 'United States', code: 'US' } },
@@ -156,6 +157,7 @@ export const AREA_CODES = {
156
157
  504: { name: 'Louisiana', code: 'LA', region: UNITED_STATES },
157
158
  985: { name: 'Louisiana', code: 'LA', region: UNITED_STATES },
158
159
  207: { name: 'Maine', code: 'ME', region: UNITED_STATES },
160
+ 227: { name: 'Maryland', code: 'MD', region: UNITED_STATES },
159
161
  240: { name: 'Maryland', code: 'MD', region: UNITED_STATES },
160
162
  301: { name: 'Maryland', code: 'MD', region: UNITED_STATES },
161
163
  410: { name: 'Maryland', code: 'MD', region: UNITED_STATES },