This commit is contained in:
8
node_modules/collapse-white-space/index.js
generated
vendored
Normal file
8
node_modules/collapse-white-space/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = collapse
|
||||
|
||||
// `collapse(' \t\nbar \nbaz\t') // ' bar baz '`
|
||||
function collapse(value) {
|
||||
return String(value).replace(/\s+/g, ' ')
|
||||
}
|
||||
22
node_modules/collapse-white-space/license
generated
vendored
Normal file
22
node_modules/collapse-white-space/license
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
70
node_modules/collapse-white-space/package.json
generated
vendored
Normal file
70
node_modules/collapse-white-space/package.json
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "collapse-white-space",
|
||||
"version": "1.0.6",
|
||||
"description": "Replace multiple white-space characters with a single space",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"collapse",
|
||||
"white",
|
||||
"space"
|
||||
],
|
||||
"repository": "wooorm/collapse-white-space",
|
||||
"bugs": "https://github.com/wooorm/collapse-white-space/issues",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"browserify": "^16.0.0",
|
||||
"nyc": "^15.0.0",
|
||||
"prettier": "^1.0.0",
|
||||
"remark-cli": "^7.0.0",
|
||||
"remark-preset-wooorm": "^6.0.0",
|
||||
"tape": "^4.0.0",
|
||||
"tinyify": "^2.0.0",
|
||||
"xo": "^0.25.0"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
|
||||
"build-bundle": "browserify . -s collapseWhiteSpace -o collapse-white-space.js",
|
||||
"build-mangle": "browserify . -s collapseWhiteSpace -p tinyify -o collapse-white-space.min.js",
|
||||
"build": "npm run build-bundle && npm run build-mangle",
|
||||
"test-api": "node test",
|
||||
"test-coverage": "nyc --reporter lcov tape test.js",
|
||||
"test": "npm run format && npm run build && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"esnext": false,
|
||||
"ignores": [
|
||||
"collapse-white-space.js"
|
||||
]
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"nyc": {
|
||||
"check-coverage": true,
|
||||
"lines": 100,
|
||||
"functions": 100,
|
||||
"branches": 100
|
||||
}
|
||||
}
|
||||
58
node_modules/collapse-white-space/readme.md
generated
vendored
Normal file
58
node_modules/collapse-white-space/readme.md
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
# collapse-white-space
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Replace multiple whitespace characters with a single space.
|
||||
|
||||
## Install
|
||||
|
||||
[npm][]:
|
||||
|
||||
```sh
|
||||
npm install collapse-white-space
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
var collapse = require('collapse-white-space')
|
||||
|
||||
collapse('\tfoo \n\tbar \t\r\nbaz') //=> ' foo bar baz'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `collapse(value)`
|
||||
|
||||
Replace multiple whitespace characters in value with a single space.
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://img.shields.io/travis/wooorm/collapse-white-space.svg
|
||||
|
||||
[build]: https://travis-ci.org/wooorm/collapse-white-space
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/collapse-white-space.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/collapse-white-space
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/collapse-white-space.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/collapse-white-space
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/collapse-white-space.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=collapse-white-space
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
Reference in New Issue
Block a user