parse-phone

0.0.6 • Public • Published

parse-phone

NPM Version NPM Downloads Build Status Test Coverage

phone parser for international dialing code parsing from full string

Installation

npm install parse-phone

Get Started

const phoneStr = "+86188888888"
const parsePhone = require('parse-phone')
const recipient = parsePhone(phoneStr)

{ success: true,
  dialCode: '+86',
  full: '+86188888888',
  phone: '188888888' }

parsePhone('+18096958000')

{ success: true,
  dialCode: '+1809',
  full: '+18096958000',
  phone: '6958000' }

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i parse-phone

    Weekly Downloads

    1

    Version

    0.0.6

    License

    ISC

    Unpacked Size

    6.75 kB

    Total Files

    7

    Last publish

    Collaborators

    • devfans