JSPM

condense-whitespace

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 50388
  • Score
    100M100P100Q161314F
  • License MIT

Remove leading, trailing, and repeated whitespace from a string

Package Exports

  • condense-whitespace

Readme

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