A Node.js package providing Google's libphonenumber library for parsing, formatting, and validating international phone numbers.
google-libphonenumber is a Node.js package that provides Google's libphonenumber library, enabling parsing, formatting, validating, and storing of international phone numbers. It solves the problem of using the original library in Node.js, which is cumbersome due to its dependency on the Google Closure library. This package offers a straightforward, dependency-free way to integrate robust phone number handling into Node.js applications.
Node.js developers building applications that require reliable international phone number validation, formatting, or parsing, such as telecommunication services, user registration systems, or contact management tools.
Developers choose google-libphonenumber because it provides direct access to Google's authoritative libphonenumber library with zero dependencies, ensuring accuracy and compatibility. Unlike other wrappers, it maintains the original API without simplifications, offering a reliable and up-to-date solution for phone number handling in Node.js.
The up-to-date and reliable Google's libphonenumber package for node.js.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The package is self-contained with no external dependencies, ensuring easy installation and reliability, as highlighted in the README under 'Zero Dependencies'.
Leverages Google's comprehensive and up-to-date carrier metadata used by Android, providing authoritative phone number validation and formatting.
Offers a 1:1 replica of libphonenumber's API without simplifications, guaranteeing compatibility with all available methods except those not ported to JS.
Includes an as-you-type formatter for progressive phone number formatting, ideal for enhancing user interfaces with input masking, as demonstrated in the usage examples.
Key features like PhoneNumberOfflineGeocoder and PhoneNumberToCarrierMapper are unavailable in the JS port, limiting data extraction capabilities for advanced use cases.
Requires explicit parsing steps before validation or formatting, leading to common errors like 'a.getCountryCodeOrDefault is not a function' if raw strings are used incorrectly, as warned in the README.
Some users report UTF-8 encoding issues in Chrome extensions, necessitating workarounds like TerserPlugin configurations to output ASCII-only characters, adding complexity to builds.