@ambassify/phonenumber

1.0.2 • Public • Published

@ambassify/phonenumber

Phonenumber utilities.

Note: At this moment, it is a wrapper around libphonenumber-js. Why?

  • to make it easier to validate and normalize phonenumbers in the same way across our projects
  • to make it easier to migrate to a more compact package than libphonenumber-js in the future
  • because it would take too much time to create a more compact package at this time

@ambassify/phonenumber/normalize

Exports a normalize function. It takes one argument, the number to normalize, and returns a new normalized number if possible and false otherwise.

@ambassify/phonenumber/validate

Exports a validation function. It takes one argument, the number to validate, and returns a boolean that indicates whether or not the number is valid.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    21
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    21
  • 1.0.1
    0

Package Sidebar

Install

npm i @ambassify/phonenumber

Weekly Downloads

21

Version

1.0.2

License

MIT

Last publish

Collaborators

  • ambassify