npm.io
3.0.0 • Published 4 years ago

condense-whitespace v3.0.0

Weekly downloads
32,365
License
MIT
Repository
github
Last release
4 years ago

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'

Related

  • trim-repeated - Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz
whitespacespacecondensecollapsecompactrepeatedstringtrimremovestrip
broken-link-checker-timeout@everything-registry/sub-chunk-1369windtoday-corewebchewerdino-cliwerdino-dailywewind-api@primediabroadcasting/person-name@dopamyn/scrapertneu-news-parser@belym.a.2105/broken-link-checker@infinitebrahmanuniverse/nolb-cond@extractus/defaults@metascraper/helpers@ignota/susy.js@plaa/metascraper-helpersozutarifa-apiparse-gurobi-solutionprimedia-person-nameprotatonever-boredrefactor-blockcoderake-jssite-link-checkersindredashsindresorhus.jsshtmlinjected-cssinject-tag-stylehafas-osm-line-colourslexis-countlegi@types/condense-whitespace@zalastax/nolb-cond@teslahunt/titlecrake-jsdeclarative-scraperbroken-link-checkerdilaeasysurfshop-apiflay-js@settingdust/article-extractor@simonjb/rake-js
3.0.0

4 years ago

2.0.0

6 years ago

1.0.0

10 years ago

contact@npm.io