first commit
This commit is contained in:
10
build/node_modules/trim-repeated/index.js
generated
vendored
Normal file
10
build/node_modules/trim-repeated/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
var escapeStringRegexp = require('escape-string-regexp');
|
||||
|
||||
module.exports = function (str, target) {
|
||||
if (typeof str !== 'string' || typeof target !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
return str.replace(new RegExp('(?:' + escapeStringRegexp(target) + '){2,}', 'g'), target);
|
||||
};
|
||||
21
build/node_modules/trim-repeated/license
generated
vendored
Normal file
21
build/node_modules/trim-repeated/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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.
|
||||
76
build/node_modules/trim-repeated/package.json
generated
vendored
Normal file
76
build/node_modules/trim-repeated/package.json
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"trim-repeated@1.0.0",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "trim-repeated@1.0.0",
|
||||
"_id": "trim-repeated@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=",
|
||||
"_location": "/trim-repeated",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "trim-repeated@1.0.0",
|
||||
"name": "trim-repeated",
|
||||
"escapedName": "trim-repeated",
|
||||
"rawSpec": "1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/filenamify"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
|
||||
"_spec": "1.0.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/trim-repeated/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^1.0.2"
|
||||
},
|
||||
"description": "Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz",
|
||||
"devDependencies": {
|
||||
"ava": "0.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/trim-repeated#readme",
|
||||
"keywords": [
|
||||
"condense",
|
||||
"collapse",
|
||||
"compact",
|
||||
"consecutive",
|
||||
"repeated",
|
||||
"string",
|
||||
"str",
|
||||
"trim",
|
||||
"remove",
|
||||
"strip",
|
||||
"character",
|
||||
"char"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "trim-repeated",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/trim-repeated.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
47
build/node_modules/trim-repeated/readme.md
generated
vendored
Normal file
47
build/node_modules/trim-repeated/readme.md
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# trim-repeated [](https://travis-ci.org/sindresorhus/trim-repeated)
|
||||
|
||||
> Trim a consecutively repeated substring: `foo--bar---baz` → `foo-bar-baz`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save trim-repeated
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var trimRepeated = require('trim-repeated');
|
||||
|
||||
trimRepeated('foo--bar---baz', '-');
|
||||
//=> 'foo-bar-baz'
|
||||
|
||||
trimRepeated('foo@#@#baz', '@#');
|
||||
//=> 'foo@#baz'
|
||||
```
|
||||
|
||||
### trimRepeated(input, target)
|
||||
|
||||
#### input
|
||||
|
||||
*Required*
|
||||
Type: `string`
|
||||
|
||||
#### target
|
||||
|
||||
*Required*
|
||||
Type: `string`
|
||||
|
||||
Substring to trim.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [`condense-whitespace`](https://github.com/sindresorhus/condense-whitespace) - Remove leading, trailing and repeated whitespace from a string
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user