Skip to content

Releases: dhershman1/phone-fns

v4.1.2

18 Oct 03:31
Compare
Choose a tag to compare

Fixed

  • Documentation examples for breakdownWithFormat function

Changed

  • Updated pinet to v1.2.1

v4.1.1

15 Oct 12:06
8ddf713
Compare
Choose a tag to compare

💄 New

  • Deprecated isValid function in favor of isValidWithFormat

🎊 Enhanced

  • Reset codecov coverage report using c8 package
  • Updated unit tests for some more coverage
  • Cleaned up some round about logic in the codebase

v4.1.0

13 Oct 16:06
a37f5af
Compare
Choose a tag to compare

💅 New

  • Added normalize function
    • This function strips out special characters and trims the phone number, much like uglify but skips non-digit characters
    • Example: normalize('555.444.3333 x 123') // => '5554443333x123' vs uglify('555.444.3333 x 123') // => 5554443333123
  • Added validate function
    • This is a validation function, but works better for world wide phone numbers as well. Expects the full number
    • Example: 333-444-5555 comes back valid but 444-5555 is invalid to this function
  • Added isValidWithFormat function
    • This takes a string phone number and a format string and validates the phone using the format
    • It's also passed through the validate function for an extra step of validation
  • Added findSeparators function
    • A simple function that finds the separators in a phone number and returns them as an array
  • Added breakdownWithFormat function
    • Works a lot like breakdown but follows a strict format provided by the user to breakdown the number into an object
    • This allows for a wider range of phone number support for breakdown

🎊 Enhanced

  • Phone-fns is no longer dependant on Kyanite and is dependency free!
  • isValid description to explain that it mostly focused on NANP numbers
  • breakdown description to better explain that it's main focus is NANP numbers and its gachas
  • We more than doubled our unit tests! Woo!

Chore

  • Renamed test files to *.spec.js instead of just *.js

v4.0.2

07 Oct 16:36
1a563db
Compare
Choose a tag to compare

Fixed

Chore

  • Dependency Updates

v4.0.1

28 Jan 05:00
235eb6b
Compare
Choose a tag to compare

💅 New

  • Added more unit tests for isValid and breakdown

🔧 Fixed

  • Added warning into README that currently phone-fns is focused on US based phone number styles
  • Updated github action to LTS of node

Chore

  • Updated dependencies

v4.0.0

17 Aug 18:11
0d653c9
Compare
Choose a tag to compare

🚨 Breaking Changes

  • Converted Phone-Fns to a standard ESM module
    • This means if you are using import statements in an ESM module for phone-fns this changes:
      • import phoneFns from 'phone-fns' --> import * as phoneFns from 'phone-fns'
      • You can also just destructure from here still like so: import { isValid } from 'phone-fns'
    • Phone fns should still support common js syntax out of the box as well
  • Upgraded to Kyanite v2.0.1

🎊 New

  • CDN support sould be working for phone-fns again
    • Updated README to reflect these changes

🥇 Improved

  • Made typings less confusing

v3.2.3

19 Nov 18:08
8c52109
Compare
Choose a tag to compare

What happened to v3.2.2?! - Well, uh funny story about that. I had work already in place on my development branch under the guise of v3.2.2, being me coming back to this after taking a break I thought it was already released... So... Turns out it wasn't! Now we're here.

New

  • Switched over to pinet jsdoc templating
  • Changed documentation hosting

Improved

  • All dependencies have been updated
  • Removed docs folder
  • Removed david-dm badge since it doesn't seem to be coming back
  • Documentation workflow now handled by circleci
  • format can now take in Number type phone numbers

v3.2.1

05 Mar 15:32
Compare
Choose a tag to compare

Improved

  • Dependency updates
  • Unit tests
  • Optimization of some code pieces
  • Some documentation

v3.2.0

01 Jul 15:33
Compare
Choose a tag to compare

New

  • Added a placeholder style syntax for underscores _

v3.1.0

07 May 14:34
fc11d86
Compare
Choose a tag to compare

Improved

  • Switched to internal currying
  • Improved formats performance and broke it down to a more intelligent function

Fixed

  • Typo in formats example
  • Remove unused code