Skip to content
Replace multiple white-space characters with a single space
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitignore
.npmrc
.prettierignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

collapse-white-space

Build Coverage Downloads Size

Replace multiple white-space characters with a single space.

Installation

npm:

npm install collapse-white-space

Usage

var collapse = require('collapse-white-space')

collapse('\tfoo \n\tbar  \t\r\nbaz') //=> ' foo bar baz'

API

collapse(value)

Replace multiple white-space characters in value with a single space.

License

MIT © Titus Wormer

You can’t perform that action at this time.