Detalhes do pacote

condense-whitespace

sindresorhus277.5kMIT3.0.0

Remove leading, trailing, and repeated whitespace from a string

whitespace, space, condense, collapse

readme (leia-me)

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---bazfoo-bar-baz