Skip to content

Commit

Permalink
chore: update pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
meabed committed Jan 3, 2024
1 parent bee69b7 commit d061e2e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"build": "rimraf lib && rollup -c --bundleConfigAsCjs",
"preparemetadata": "rimraf resources && node tools/prepare.js && rimraf resources/libphonenumber",
"prepublishOnly": "yarn build",
"prettier": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"test": "jest",
"watch": "rimraf lib && rollup -cw"
},
Expand Down
46 changes: 44 additions & 2 deletions src/locales.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
/* THIS FILE IS AUTOGENERATED. */
export type GeocoderLocale = 'ar' | 'be' | 'bg' | 'bs' | 'de' | 'el' | 'en' | 'es' | 'fa' | 'fi' | 'fr' | 'hr' | 'hu' | 'hy' | 'id' | 'it' | 'iw' | 'ja' | 'ko' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sq' | 'sr' | 'sv' | 'th' | 'tr' | 'uk' | 'vi' | 'zh' | 'zh_Hant';
export type CarrierLocale = 'ar' | 'be' | 'en' | 'fa' | 'ko' | 'ru' | 'uk' | 'zh' | 'zh_Hant';
export type GeocoderLocale =
| 'ar'
| 'be'
| 'bg'
| 'bs'
| 'de'
| 'el'
| 'en'
| 'es'
| 'fa'
| 'fi'
| 'fr'
| 'hr'
| 'hu'
| 'hy'
| 'id'
| 'it'
| 'iw'
| 'ja'
| 'ko'
| 'nl'
| 'pl'
| 'pt'
| 'ro'
| 'ru'
| 'sq'
| 'sr'
| 'sv'
| 'th'
| 'tr'
| 'uk'
| 'vi'
| 'zh'
| 'zh_Hant'
export type CarrierLocale =
| 'ar'
| 'be'
| 'en'
| 'fa'
| 'ko'
| 'ru'
| 'uk'
| 'zh'
| 'zh_Hant'
10 changes: 10 additions & 0 deletions test/carrier.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { carrier } from '../src'
import parsePhoneNumber from 'libphonenumber-js'

describe('Phone Number Lookup', () => {
it('should return carrier', async () => {
const phoneNumber = parsePhoneNumber('+14158586273')
const res = carrier(phoneNumber)
expect(res).toEqual(null)
})
})
2 changes: 1 addition & 1 deletion src/index.test.ts → test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
geocoder,
parsePhoneNumberFromString,
timezones,
} from './index'
} from '../src'

it('geocodes with default locale en', async () => {
const phoneNr = parsePhoneNumberFromString('+41431234567')
Expand Down

0 comments on commit d061e2e

Please sign in to comment.