npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

condense-whitespace

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

9,535

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability