awesome-phonenumber
awesome-phonenumber copied to clipboard
Google's libphonenumber pre-compiled with the closure compiler
Usually getNumber() will format number only when full number is provided. But for Germany it will format even incomplete number but "ayt" will not work at all.
``` const pn = parsePhoneNumber( '0707123456', 'SE' ); pn.getNumber( 'international' ); // -> '+46 70 712 34 56' ``` How to get `70 712 34 56` without "+46 "
Dear awesome phonenumber team. I'd like to use this via deno style import. I could not find anything related in your README.md. As you published it here: https://deno.land/x/[email protected] I guess...
So types get resolved for esm. ``` src/phone.ts:1:25 - error TS7016: Could not find a declaration file for module 'awesome-phonenumber'. '.../node_modules/awesome-phonenumber/index-esm.mjs' implicitly has an 'any' type. Try `npm i --save-dev...
Heya, thanks for the library! Ran into an issue where some methods actually return `undefined` although the type definitions specify them as always returning a value. More specifically these: ```...
I am working on a design that includes a select dropdown for country codes. I obtain the codes using the following approach: ``` const codes = getSupportedCallingCodes() .map((code) => `+${code}`)...
1st OSS PR, go easy on me! Thanks for this package, I started out rolling my own validation for various phone numbers and swiftly realised this was a large task...
One example of this ``` getExample("AQ") //Antarctica ``` This is an issue in my case because we want to have every country on earth available in our phone input. I...
Will you support 6-digit EU-numbers? https://en.wikipedia.org/wiki/Short_code#European_Union https://nkom.no/telefoni-og-telefonnummer/telefonnummer-og-den-norske-nummerplan/alle-nummerserier-for-norske-telefonnumre#6sifrede_esharmoniserte_nummer https://libphonenumber.appspot.com/phonenumberparser?number=116117&country=NO > Short Number Results > Result from isPossibleShortNumber() true > Result from isValidShortNumber() true > Result from isPossibleShortNumberForRegion() true > Result from...
``` const {parsePhoneNumber} = require('awesome-phonenumber'); //v6.1.0 const parsed = parsePhoneNumber('7185555555'); expect(parsed.type).to.eql(undefined); // this passes but should not ``` `type` is not not `optional` ``` interface ParsedPhoneNumberFull { ... type: PhoneNumberTypes;...