condense-whitespace

Remove leading, trailing, and repeated whitespace from a string

MIT 3 个版本
安装
npm install condense-whitespace
yarn add condense-whitespace
pnpm add condense-whitespace
bun add 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
版本列表
3.0.0 2021-08-10
2.0.0 2019-04-09
1.0.0 2015-01-13