phonenumberlite

1.0.5 • Public • Published

cloned from https://github.com/andreasgal/PhoneNumber.js

PhoneNumberLite.js

Is a JavaScript library to verify and format phone numbers. It is similar in purpose to Google's libphonenumber library, with the main difference that Google's code is some incredibly ugly spaghetti code that was cross-compiled from Java and uses around 10MB of memory.

The memory use of PhoneNumber.js starts around 60k and increases as region meta data is unpacked. Depending on the memory layout of the specific JavaScript engine, peak memory use should be below 200k. If you mostly format numbers from one or a few regions, memory use should be pretty close to 60k.

PhoneNumber.js uses libphonenumber's PhoneNumberMetadata.xml database of known phone number formats. Use "make" to download the xml file and translate it into PhoneNumber.js's internal format.

Copyright and license

PhoneNumber.js was written by Andreas Gal gal@mozilla.com as part of Mozilla's Firefox OS (Boot to Gecko) project and is licensed under the Apache License, Version 2.0.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.528latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.528
1.0.40
1.0.31
1.0.26
1.0.14
1.0.01
0.1.70
0.1.50
0.1.40
0.1.30
0.1.22
0.1.11
0.1.00

Package Sidebar

Install

npm i phonenumberlite

Weekly Downloads

43

Version

1.0.5

License

Apache-2.0

Unpacked Size

27.1 kB

Total Files

8

Last publish

Collaborators

  • witem