1.0.2 • Published 7 years ago

strip-and-shape-phone v1.0.2

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

strip-and-shape-phone

A utility function that prefaces a phone number with '+1'.

Usage:

import stripAndShapePhone from 'strip-and-shape-phone'; // Your NPM package.

const phoneNumber = '843-555-1234'; // The string to be formatted.

const formattedNumber = stripAndShapePhone(phoneNumber); // Calling the imported package.

formattedNumber === '+18435551234'; // true