Skip to content

A Polymer Element used to add formatting to 10-digit phone numbers.

License

Notifications You must be signed in to change notification settings

DigElements/phone-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phone-formatter

A Polymer Element used to add formatting to telephone numbers.

Example

<phone-formatter input="0123456789" format="parentheses"></phone-formatter>

Options

The format property supports the following options:

Option Examples
"dashes" 012-345-6789, 111-222-333-4444
"parentheses" (012) 345-6789, +111 (222) 333-4444
"periods" 012.345.6789, 111.222.333.4444
"spaces" 012 345 6789, 111 222 333 4444
an empty or unsupported option 0123456789, +1112223334444

Dependencies

Dependencies are installed using Bower:

npm install -g bower
bower install

Testing

Tests are run using web-component-tester:

npm install -g web-component-tester
wct

Demonstration & Documentation

Demonstration and documentation are viewed using polyserve:

npm install -g polyserve
polyserve

About

A Polymer Element used to add formatting to 10-digit phone numbers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages