
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
libphonenumber-js-utils
Advanced tools
# What is it? This repo is a compiled and minified version of the utilities functions from the [googlei18n's libphonenumber](https://github.com/googlei18n/libphonenumber) library. The functions are exposed to `window.intlTelInputUtils` inside browser envi
This repo is a compiled and minified version of the utilities functions from the googlei18n's libphonenumber library.
The functions are exposed to window.intlTelInputUtils
inside browser environment.
libphonenumber-js-utils
to the package dependency.import 'libphonenumber-js-utils';
in your code.window.intlTelInputUtils
.Name | Type | Description |
---|---|---|
formatNumber | Function | Format Phone number according to country |
getExampleNumber | Function | Get example phonenumber of a country |
getExtension | Function | |
getNumberType | Function | Get the type of number entered like FIXED_LINE , MOBILE , etc. |
getValidationError | Function | Get the validation error |
isValidNumber | Function | Check if a number is valid for a country |
numberFormat | Enum | Possible Values: • NATIONAL • INTERNATIONAL |
numberType | Enum | Possible Values: • FIXED_LINE • MOBILE • FIXED_LINE_OR_MOBILE • TOLL_FREE • PREMIUM_RATE • SHARED_COST • VOIP • PERSONAL_NUMBER • PAGER • UAN • VOICEMAIL • UNKNOWN |
validationError | Enum | Possible Values: • IS_POSSIBLE • INVALID_COUNTRY_CODE • TOO_SHORT • TOO_LONG • NOT_A_NUMBER |
Checkout closure-library, closure-compiler, closure-linter and python-gflags next to libphonenumber:
git clone https://github.com/googlei18n/libphonenumber/
git clone https://github.com/google/closure-library/
git clone https://github.com/google/closure-compiler.git
git clone https://github.com/google/closure-linter.git
git clone https://github.com/google/python-gflags.git
Build Closure's compiler.jar:
mvn -DskipTests
Copy the contents of
src/libphonenumber.js
to libphonenumber/javascript/i18n/phonenumbers/demo.js
.
Compile the demo.js and all its dependencies to one file: demo-compiled.js
:
ant -f javascript/build.xml compile-demo
Run the compiled demo: javascript/i18n/phonenumbers/demo-compiled.html
FAQs
# What is it? This repo is a compiled and minified version of the utilities functions from the [googlei18n's libphonenumber](https://github.com/googlei18n/libphonenumber) library. The functions are exposed to `window.intlTelInputUtils` inside browser envi
The npm package libphonenumber-js-utils receives a total of 28,428 weekly downloads. As such, libphonenumber-js-utils popularity was classified as popular.
We found that libphonenumber-js-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.