0.2.5 • Published 8 years ago
phone-number-jp v0.2.5
phone-number-jp
Installation
npm install phone-number-jp
Basic usage
You can split the phone number.
import splitter from 'phone-number-jp';
const results = splitter.split('0768223333');
console.log(results[0]); // 0768
console.log(results[1]); // 22
console.log(results[2]); // 3333
You can format the phone number.
import splitter from 'phone-number-jp';
const result = splitter.format('0768223333');
console.log(result); // 0768-22-3333
Run the test
npm install
npm run instrument
npm test