mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
PR-URL: https://github.com/nodejs/node/pull/16738 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
collapse-white-space

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.