Socket
Socket
Sign inDemoInstall

phone-fns

Package Overview
Dependencies
1
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1

1.0.0

Diff

Changelog

Source

v1.0.0

v1.0.0 is almost a total re write of how the library functions from v0.3.3 it is advised you migrate with caution

BREAKING CHANGES

  • Removed findLocal function
  • Removed getCode function
  • Removed getCountries function
  • Removed getCountryCode function
  • Removed callingCodes
  • Changed identical to match
  • Re org of entire library
    • You can now create instances of the library with different country codes or none
    • This applies the country code to each method that needs it meaning you don't need to send it as a param
  • Changed the parameter of most of the functions
  • If using the individual functions you will have to provide a country code to those that need it
  • find parameters have been rotated

New

  • Added the ability to call phoneFns as a function and provide a country code to create an instance around that country code, or not for only base phone number functionality
  • The format function is now curried
  • The find function is curried as well

Improved

  • The breakdown function to be a little more lightweight
  • The format function to be a bit more lightweight and functional
  • The isValid function to do decently better phone number validation
killparadise
published 0.3.3 •

Changelog

Source

v0.3.3

  • Fix for automating docs file
  • Build files should appear again
killparadise
published 0.3.2 •

Changelog

Source

v0.3.2

  • Better(working) fix for webpack builds issue
  • Better Main JS generator
killparadise
published 0.3.1 •

Changelog

Source

v0.3.1

  • Fix for Webpack build issues when importing base module
  • README typo fixes
killparadise
published 0.3.0 •

Changelog

Source

v0.3.0

  • Consistancy Tweaks in some files
  • Changed getCode to getCountryCode
    • Notice that this now means getCode is depricated
    • This is not yet a breaking change but may be in the future (1.0.0 release probably)
  • Changed findLocal to getCountries
    • Notice that this now means findLocal is depricated
    • This is not yet a breaking change but may be in the future (1.0.0 release probably)
  • Introduced webpack as the builder to help build out the public module
    • This shouldn't have any large effects, if you do see an issue please let me know asap!
  • Updated all dependencies
  • Text Tweaks in some error messages
killparadise
published 0.2.0 •

Changelog

Source

v0.2.0

  • Tweaks to build process
  • Added ability to call functional methods individually you can do so using the following:
    • phone-fns/format
    • phone-fns/find
    • phone-fns/breakdown
    • phone-fns/identical
    • phone-fns/isValid
    • phone-fns/uglify
    • phone-fns/getCode
    • phone-fns/findLocal
    • phone-fns/callingCodes - Gives back the full list of country calling codes
    • You can still use just phone-fns to get back all of the methods in an object
  • Added a minified version phone-fns.min.js the module points to this version by default
  • Renamed the file phone-fns.umd.js to just phone-fns.js
  • Added Country Calling Codes from the Countries Repo
  • Added findLocal function which returns the country names associated with the passed in code
  • Added getCode function which returns the country calling code from the json
  • Removed country code dashing, since it's not really a thing
killparadise
published 0.1.0 •

Changelog

Source

v0.1.0

  • Initial Public Release
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc