Skip to content

Latest commit

 

History

History
30 lines (16 loc) · 658 Bytes

readme.md

File metadata and controls

30 lines (16 loc) · 658 Bytes

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