Never Patronize Mothers

    @doctolib/libphonenumber

    0.0.2 • Public • Published

    libphonenumber

    Phone number internationalization interface using libphonenumber.

    Requirements

    Node, Java, Maven and Ant.

    Install

    # Install
    npm install && npm run install:all && npm run build:all

    Update

    npm run update:all && npm run build:all

    API

    libphonenumber.getSupportedRegionCodes(): [{regionCode, countryCode}]

    List supported region codes.

    libphonenumber.parseRegionCode(regionCode: String, number: String): String

    Return region code from provided number or current region code.

    libphonenumber.isValidNumber(regionCode: String, number: String): Boolean

    Return true if phone number is valid for regionCode.

    libphonenumber.injectCountryCode(defaultRegionCode: String, regionCode: String, number: String): Boolean

    Replace or inject number countryCode.

    libphonenumber.formatNumber(defaultRegionCode: String, regionCode: String, number: String): String

    Format number as a national one if number region is the current region, otherwise as an international none.

    libphonenumber.formatInputNumber(regionCode: String, number: String): String

    Try to format provided number as it is typed.

    Install

    npm i @doctolib/libphonenumber

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    236 kB

    Total Files

    5

    Last publish

    Collaborators

    • doctolib-eric
    • bpaquet
    • rizzen
    • rpellerin
    • vannayer
    • techdoctolib