You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Vse Mozhet Byt b4fea2a3d6 doc: add eslint-plugin-markdown 8 years ago
..
LICENSE doc: add eslint-plugin-markdown 8 years ago
history.md doc: add eslint-plugin-markdown 8 years ago
index.js doc: add eslint-plugin-markdown 8 years ago
package.json doc: add eslint-plugin-markdown 8 years ago
readme.md doc: add eslint-plugin-markdown 8 years ago

readme.md

collapse-white-space Build Status Coverage Status

Replace multiple white-space characters with a single space.

Installation

npm:

npm install collapse-white-space

Usage

Dependencies.

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

Collapse white space:

var result = collapse('\tfoo \n\tbar  \t\r\nbaz');

Yields:

 foo bar baz

API

collapse(value)

Replace multiple white-space characters with a single space.

Parameters
  • value (string) — Value with uncollapsed white-space, coerced to string.
Returns

string — Value with collapsed white-space.

License

MIT © Titus Wormer