condense-whitespace
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    condense-whitespace Build Status

    Remove leading, trailing, and repeated whitespace from a string

    Install

    $ npm install condense-whitespace
    

    Usage

    const condenseWhitespace = require('condense-whitespace');
     
    condenseWhitespace('  foo bar     baz ');
    //=> 'foo bar baz'

    Related

    • trim-repeated - Trim a consecutively repeated substring: foo--bar---bazfoo-bar-baz

    License

    MIT © Sindre Sorhus

    Install

    npm i condense-whitespace

    DownloadsWeekly Downloads

    17,817

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    2.92 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar