Wondering what’s next for npm?Check out our public roadmap! »

    @ng-kit/us-phone-format

    1.0.2 • Public • Published

    ng kit US Phone Format

    ng-kit US Phone Format is an angular $filter that converts strings to US phone format.

    Development

    To create a environment from scratch, install all the following dependencies.

    NVM and NPM

    nvm install 5
    

    NPM global packages

    npm install -g grunt-cli@1.2.0 grunt@0.4.5 npm@3.8.6
    

    Usage

    This filter expects a single string of only numbers, e.g. 5551234567 and converts it to (555) 123-4567.

    In Template

    <p>{{'5551234567' | usPhoneFormat}}</p>
    <!-- Outputs <p>(555) 123-4567</p> -->

    In Controller

    function exampleController($filter) {
        $filter('usPhoneFormat', '5551234567'); // Outputs (555) 123-4567
    };

    Install

    npm i @ng-kit/us-phone-format

    DownloadsWeekly Downloads

    5

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    2.91 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar