Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 22-Nov-2021 | - | ||||
license | H A D | 22-Nov-2021 | 1.1 KiB | 23 | 18 | |
package.json | H A D | 22-Nov-2021 | 1.8 KiB | 71 | 70 | |
readme.md | H A D | 22-Nov-2021 | 1.2 KiB | 59 | 33 |
readme.md
1# collapse-white-space 2 3[![Build][build-badge]][build] 4[![Coverage][coverage-badge]][coverage] 5[![Downloads][downloads-badge]][downloads] 6[![Size][size-badge]][size] 7 8Replace multiple whitespace characters with a single space. 9 10## Install 11 12[npm][]: 13 14```sh 15npm install collapse-white-space 16``` 17 18## Use 19 20```js 21var collapse = require('collapse-white-space') 22 23collapse('\tfoo \n\tbar \t\r\nbaz') //=> ' foo bar baz' 24``` 25 26## API 27 28### `collapse(value)` 29 30Replace multiple whitespace characters in value with a single space. 31 32## License 33 34[MIT][license] © [Titus Wormer][author] 35 36<!-- Definitions --> 37 38[build-badge]: https://img.shields.io/travis/wooorm/collapse-white-space.svg 39 40[build]: https://travis-ci.org/wooorm/collapse-white-space 41 42[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/collapse-white-space.svg 43 44[coverage]: https://codecov.io/github/wooorm/collapse-white-space 45 46[downloads-badge]: https://img.shields.io/npm/dm/collapse-white-space.svg 47 48[downloads]: https://www.npmjs.com/package/collapse-white-space 49 50[size-badge]: https://img.shields.io/bundlephobia/minzip/collapse-white-space.svg 51 52[size]: https://bundlephobia.com/result?p=collapse-white-space 53 54[npm]: https://docs.npmjs.com/cli/install 55 56[license]: license 57 58[author]: https://wooorm.com 59