Skip to content

ysdanielkim/phone-number-formatter-us

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone Number Formatter (US)

Format phone number in (xxx) xxx-xxxx format.

Usage

var format = require ('./phone-number-formatter')

console.log(format('1234567890'));

Result: (123) 456-7890

Features

  • Reject non numeric characters
  • Truncate longer than 10 digits
  • Partial completion

About

Format phone number in (xxx) xxx-xxxx format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published