npm.io
3.0.0 • Published 4 years ago

condense-whitespace

Licence
MIT
Version
3.0.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
42

condense-whitespace

Remove leading, trailing, and repeated whitespace from a string

Install

$ npm install condense-whitespace

Usage

import condenseWhitespace from 'condense-whitespace';

condenseWhitespace('  foo bar     baz ');
//=> 'foo bar baz'
  • trim-repeated - Trim a consecutively repeated substring: foo--bar---bazfoo-bar-baz

Keywords