Google's libphonenumber
is an ultimate phone number formatting and parsing library developed by Google for Android phones. It is written in C++ and Java, and, while it has an official autogenerated javascript port, that port is tightly coupled to Google's closure
javascript framework, and, when compiled into a bundle, weighs about 550 kB (350 kB code + 200 kB metadata).
With many websites today asking for user's phone number, the internet could benefit from a simpler and smaller library that would just get the parsing and formatting right, and that's what libphonenumber-js
is.
Smaller footprint:
145 kB
(65 kB code + 80 kB sufficient metadata) vs the original Google's550 kB
(350 kB code + 200 kB full metadata).
npm size does not seem to be relevant for deployment
Unpacked Size
Weekly Downloads
3,022,778
The up-to-date and reliable Google's libphonenumber package for node.js. Zero dependencies.
Unpacked Size
Weekly Downloads
1,067,801
No comments:
Post a Comment