Releases: dhershman1/phone-fns
Releases · dhershman1/phone-fns
v4.1.2
v4.1.1
💄 New
- Deprecated
isValid
function in favor ofisValidWithFormat
🎊 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
💅 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'
vsuglify('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 but444-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
- Works a lot like
🎊 Enhanced
Phone-fns
is no longer dependant onKyanite
and is dependency free!isValid
description to explain that it mostly focused on NANP numbersbreakdown
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
v4.0.1
💅 New
- Added more unit tests for
isValid
andbreakdown
🔧 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
🚨 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
- This means if you are using import statements in an ESM module for phone-fns this changes:
- 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
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 inNumber
type phone numbers
v3.2.1
Improved
- Dependency updates
- Unit tests
- Optimization of some code pieces
- Some documentation
v3.2.0
New
- Added a placeholder style syntax for underscores
_
v3.1.0
Improved
- Switched to internal currying
- Improved
format
s performance and broke it down to a more intelligent function
Fixed
- Typo in
format
s example - Remove unused code