2.0.0
This commit is contained in:
parent
15d7241ff5
commit
44724f0760
15
node_modules/.bin/cleancss
generated
vendored
15
node_modules/.bin/cleancss
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../clean-css/bin/cleancss" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../clean-css/bin/cleancss" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/cleancss.cmd
generated
vendored
7
node_modules/.bin/cleancss.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\clean-css\bin\cleancss" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\clean-css\bin\cleancss" %*
|
||||
)
|
15
node_modules/.bin/gulp
generated
vendored
15
node_modules/.bin/gulp
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../gulp/bin/gulp.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../gulp/bin/gulp.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/gulp.cmd
generated
vendored
7
node_modules/.bin/gulp.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\gulp\bin\gulp.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\gulp\bin\gulp.js" %*
|
||||
)
|
15
node_modules/.bin/mkdirp
generated
vendored
15
node_modules/.bin/mkdirp
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/mkdirp.cmd
generated
vendored
7
node_modules/.bin/mkdirp.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\mkdirp\bin\cmd.js" %*
|
||||
)
|
15
node_modules/.bin/rimraf
generated
vendored
15
node_modules/.bin/rimraf
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../rimraf/bin.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../rimraf/bin.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/rimraf.cmd
generated
vendored
7
node_modules/.bin/rimraf.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\rimraf\bin.js" %*
|
||||
)
|
15
node_modules/.bin/semver
generated
vendored
15
node_modules/.bin/semver
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../semver/bin/semver" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../semver/bin/semver" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/semver.cmd
generated
vendored
7
node_modules/.bin/semver.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\semver\bin\semver" %*
|
||||
)
|
15
node_modules/.bin/strip-bom
generated
vendored
15
node_modules/.bin/strip-bom
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../strip-bom/cli.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../strip-bom/cli.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/strip-bom.cmd
generated
vendored
7
node_modules/.bin/strip-bom.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\strip-bom\cli.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\strip-bom\cli.js" %*
|
||||
)
|
15
node_modules/.bin/uglifyjs
generated
vendored
15
node_modules/.bin/uglifyjs
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../uglify-js/bin/uglifyjs" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/uglifyjs.cmd
generated
vendored
7
node_modules/.bin/uglifyjs.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\uglify-js\bin\uglifyjs" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\uglify-js\bin\uglifyjs" %*
|
||||
)
|
15
node_modules/.bin/user-home
generated
vendored
15
node_modules/.bin/user-home
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../user-home/cli.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../user-home/cli.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/user-home.cmd
generated
vendored
7
node_modules/.bin/user-home.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\user-home\cli.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\user-home\cli.js" %*
|
||||
)
|
15
node_modules/.bin/which
generated
vendored
15
node_modules/.bin/which
generated
vendored
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../which/bin/which" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../which/bin/which" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
node_modules/.bin/which.cmd
generated
vendored
7
node_modules/.bin/which.cmd
generated
vendored
@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\which\bin\which" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\which\bin\which" %*
|
||||
)
|
21
node_modules/align-text/LICENSE
generated
vendored
21
node_modules/align-text/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015, Jon Schlinkert.
|
||||
|
||||
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.
|
236
node_modules/align-text/README.md
generated
vendored
236
node_modules/align-text/README.md
generated
vendored
@ -1,236 +0,0 @@
|
||||
# align-text [![NPM version](https://badge.fury.io/js/align-text.svg)](http://badge.fury.io/js/align-text) [![Build Status](https://travis-ci.org/jonschlinkert/align-text.svg)](https://travis-ci.org/jonschlinkert/align-text)
|
||||
|
||||
> Align the text in a string.
|
||||
|
||||
**Examples**
|
||||
|
||||
Align text values in an array:
|
||||
|
||||
```js
|
||||
align([1, 2, 3, 100]);
|
||||
//=> [' 1', ' 2', ' 3', '100']
|
||||
```
|
||||
|
||||
Or [do stuff like this](./example.js):
|
||||
|
||||
[![screen shot 2015-06-09 at 2 08 34 am](https://cloud.githubusercontent.com/assets/383994/8051597/7b716fbc-0e4c-11e5-9aef-4493fd22db58.png)](./example.js)
|
||||
|
||||
Visit [the example](./example.js) to see how this works.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i align-text --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var align = require('align-text');
|
||||
align(text, callback_function_or_integer);
|
||||
```
|
||||
|
||||
**Params**
|
||||
|
||||
* `text` can be a **string or array**. If a string is passed, a string will be returned. If an array is passed, an array will be returned.
|
||||
* `callback|integer`: if an integer, the text will be indented by that amount. If a function, it must return an integer representing the amount of leading indentation to use as `align` loops over each line.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
align(text, 4);
|
||||
```
|
||||
|
||||
Would align:
|
||||
|
||||
```
|
||||
abc
|
||||
abc
|
||||
abc
|
||||
```
|
||||
|
||||
To:
|
||||
|
||||
```
|
||||
abc
|
||||
abc
|
||||
abc
|
||||
```
|
||||
|
||||
## callback
|
||||
|
||||
### params
|
||||
|
||||
The callback is used to determine the indentation of each line and gets the following params:
|
||||
|
||||
* `len` the length of the "current" line
|
||||
* `longest` the length of the longest line
|
||||
* `line` the current line (string) being aligned
|
||||
* `lines` the array of all lines
|
||||
|
||||
### return
|
||||
|
||||
The callback may return:
|
||||
|
||||
* an integer that represents the number of spaces to use for padding,
|
||||
* or an object with the following properties:
|
||||
- `indent`: **{Number}** the amount of indentation to use. Default is `0` when an object is returned.
|
||||
- `character`: **{String}** the character to use for indentation. Default is `''` (empty string) when an object is returned.
|
||||
- `prefix`: **{String}** leading characters to use at the beginning of each line. `''` (empty string) when an object is returned.
|
||||
|
||||
**Integer example:**
|
||||
|
||||
```js
|
||||
// calculate half the difference between the length
|
||||
// of the current line and the longest line
|
||||
function centerAlign(len, longest, line, lines) {
|
||||
return Math.floor((longest - len) / 2);
|
||||
}
|
||||
```
|
||||
|
||||
**Object example:**
|
||||
|
||||
```js
|
||||
function centerAlign(len, longest, line, lines) {
|
||||
return {
|
||||
character: '\t',
|
||||
indent: Math.floor((longest - len) / 2),
|
||||
prefix: '~ ',
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Usage examples
|
||||
|
||||
### Center align
|
||||
|
||||
Using the `centerAlign` function from above:
|
||||
|
||||
```js
|
||||
align(text, centerAlign);
|
||||
```
|
||||
|
||||
Would align this text:
|
||||
|
||||
```js
|
||||
Lorem ipsum dolor sit amet
|
||||
consectetur adipiscin
|
||||
elit, sed do eiusmod tempor incididun
|
||||
ut labore et dolor
|
||||
magna aliqua. Ut enim ad mini
|
||||
veniam, quis
|
||||
```
|
||||
|
||||
Resulting in this:
|
||||
|
||||
```
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing
|
||||
elit, sed do eiusmod tempor incididunt
|
||||
ut labore et dolore
|
||||
magna aliqua. Ut enim ad minim
|
||||
veniam, quis
|
||||
```
|
||||
|
||||
**Customize**
|
||||
|
||||
If you wanted to add more padding on the left, just pass the number in the callback.
|
||||
|
||||
For example, to add 4 spaces before every line:
|
||||
|
||||
```js
|
||||
function centerAlign(len, longest, line, lines) {
|
||||
return 4 + Math.floor((longest - len) / 2);
|
||||
}
|
||||
```
|
||||
|
||||
Would result in:
|
||||
|
||||
```
|
||||
Lorem ipsum dolor sit amet,
|
||||
consectetur adipiscing
|
||||
elit, sed do eiusmod tempor incididunt
|
||||
ut labore et dolore
|
||||
magna aliqua. Ut enim ad minim
|
||||
veniam, quis
|
||||
```
|
||||
|
||||
### Bullets
|
||||
|
||||
```js
|
||||
align(text, function (len, max, line, lines) {
|
||||
return {prefix: ' - '};
|
||||
});
|
||||
```
|
||||
|
||||
Would return:
|
||||
|
||||
```
|
||||
- Lorem ipsum dolor sit amet,
|
||||
- consectetur adipiscing
|
||||
- elit, sed do eiusmod tempor incididunt
|
||||
- ut labore et dolore
|
||||
- magna aliqua. Ut enim ad minim
|
||||
- veniam, quis
|
||||
```
|
||||
|
||||
### Different indent character
|
||||
|
||||
```js
|
||||
align(text, function (len, max, line, lines) {
|
||||
return {
|
||||
indent: Math.floor((max - len) / 2),
|
||||
character: '~',
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
Would return
|
||||
|
||||
```
|
||||
~~~~~Lorem ipsum dolor sit amet,
|
||||
~~~~~~~~consectetur adipiscing
|
||||
elit, sed do eiusmod tempor incididunt
|
||||
~~~~~~~~~ut labore et dolore
|
||||
~~~~magna aliqua. Ut enim ad minim
|
||||
~~~~~~~~~~~~~veniam, quis
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
* [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string.
|
||||
* [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using a custom width and character
|
||||
* [longest](https://github.com/jonschlinkert/longest): Get the longest item in an array.
|
||||
* [right-align](https://github.com/jonschlinkert/right-align): Right-align the text in a string.
|
||||
* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string.
|
||||
* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length.
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/align-text/issues/new)
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 09, 2015._
|
52
node_modules/align-text/index.js
generated
vendored
52
node_modules/align-text/index.js
generated
vendored
@ -1,52 +0,0 @@
|
||||
/*!
|
||||
* align-text <https://github.com/jonschlinkert/align-text>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var typeOf = require('kind-of');
|
||||
var repeat = require('repeat-string');
|
||||
var longest = require('longest');
|
||||
|
||||
module.exports = function alignText(val, fn) {
|
||||
var lines, type = typeOf(val);
|
||||
|
||||
if (type === 'array') {
|
||||
lines = val;
|
||||
} else if (type === 'string') {
|
||||
lines = val.split(/(?:\r\n|\n)/);
|
||||
} else {
|
||||
throw new TypeError('align-text expects a string or array.');
|
||||
}
|
||||
|
||||
var fnType = typeOf(fn);
|
||||
var len = lines.length;
|
||||
var max = longest(lines);
|
||||
var res = [], i = 0;
|
||||
|
||||
while (len--) {
|
||||
var line = String(lines[i++]);
|
||||
var diff;
|
||||
|
||||
if (fnType === 'function') {
|
||||
diff = fn(line.length, max.length, line, lines, i);
|
||||
} else if (fnType === 'number') {
|
||||
diff = fn;
|
||||
} else {
|
||||
diff = max.length - line.length;
|
||||
}
|
||||
|
||||
if (typeOf(diff) === 'number') {
|
||||
res.push(repeat(' ', diff) + line);
|
||||
} else if (typeOf(diff) === 'object') {
|
||||
var result = repeat(diff.character || ' ', diff.indent || 0);
|
||||
res.push((diff.prefix || '') + result + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (type === 'array') return res;
|
||||
return res.join('\n');
|
||||
};
|
117
node_modules/align-text/package.json
generated
vendored
117
node_modules/align-text/package.json
generated
vendored
@ -1,117 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "align-text@^0.1.3",
|
||||
"scope": null,
|
||||
"escapedName": "align-text",
|
||||
"name": "align-text",
|
||||
"rawSpec": "^0.1.3",
|
||||
"spec": ">=0.1.3 <0.2.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\center-align"
|
||||
]
|
||||
],
|
||||
"_from": "align-text@>=0.1.3 <0.2.0",
|
||||
"_id": "align-text@0.1.4",
|
||||
"_inCache": true,
|
||||
"_location": "/align-text",
|
||||
"_nodeVersion": "5.5.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-9-west.internal.npmjs.com",
|
||||
"tmp": "tmp/align-text-0.1.4.tgz_1454377856920_0.9624228512402624"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "shinnn",
|
||||
"email": "snnskwtnb@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.6.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "align-text@^0.1.3",
|
||||
"scope": null,
|
||||
"escapedName": "align-text",
|
||||
"name": "align-text",
|
||||
"rawSpec": "^0.1.3",
|
||||
"spec": ">=0.1.3 <0.2.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/center-align",
|
||||
"/right-align"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
|
||||
"_shasum": "0cd90a561093f35d0a99256c22b7069433fad117",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "align-text@^0.1.3",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\center-align",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/align-text/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"kind-of": "^3.0.2",
|
||||
"longest": "^1.0.1",
|
||||
"repeat-string": "^1.5.2"
|
||||
},
|
||||
"description": "Align the text in a string.",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"should": "*",
|
||||
"word-wrap": "^1.0.3"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "0cd90a561093f35d0a99256c22b7069433fad117",
|
||||
"tarball": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "7f08e823a54c6bda319d875895813537a66a4c5e",
|
||||
"homepage": "https://github.com/jonschlinkert/align-text",
|
||||
"keywords": [
|
||||
"align",
|
||||
"align-center",
|
||||
"alignment",
|
||||
"center",
|
||||
"center-align",
|
||||
"indent",
|
||||
"pad",
|
||||
"padding",
|
||||
"right",
|
||||
"right-align",
|
||||
"text",
|
||||
"typography"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
{
|
||||
"name": "shinnn",
|
||||
"email": "snnskwtnb@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "align-text",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jonschlinkert/align-text.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.1.4"
|
||||
}
|
58
node_modules/amdefine/LICENSE
generated
vendored
58
node_modules/amdefine/LICENSE
generated
vendored
@ -1,58 +0,0 @@
|
||||
amdefine is released under two licenses: new BSD, and MIT. You may pick the
|
||||
license that best suits your development needs. The text of both licenses are
|
||||
provided below.
|
||||
|
||||
|
||||
The "New" BSD License:
|
||||
----------------------
|
||||
|
||||
Copyright (c) 2011-2016, The Dojo Foundation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the Dojo Foundation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
|
||||
MIT License
|
||||
-----------
|
||||
|
||||
Copyright (c) 2011-2016, The Dojo Foundation
|
||||
|
||||
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.
|
171
node_modules/amdefine/README.md
generated
vendored
171
node_modules/amdefine/README.md
generated
vendored
@ -1,171 +0,0 @@
|
||||
# amdefine
|
||||
|
||||
A module that can be used to implement AMD's define() in Node. This allows you
|
||||
to code to the AMD API and have the module work in node programs without
|
||||
requiring those other programs to use AMD.
|
||||
|
||||
## Usage
|
||||
|
||||
**1)** Update your package.json to indicate amdefine as a dependency:
|
||||
|
||||
```javascript
|
||||
"dependencies": {
|
||||
"amdefine": ">=0.1.0"
|
||||
}
|
||||
```
|
||||
|
||||
Then run `npm install` to get amdefine into your project.
|
||||
|
||||
**2)** At the top of each module that uses define(), place this code:
|
||||
|
||||
```javascript
|
||||
if (typeof define !== 'function') { var define = require('amdefine')(module) }
|
||||
```
|
||||
|
||||
**Only use these snippets** when loading amdefine. If you preserve the basic structure,
|
||||
with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).
|
||||
|
||||
You can add spaces, line breaks and even require amdefine with a local path, but
|
||||
keep the rest of the structure to get the stripping behavior.
|
||||
|
||||
As you may know, because `if` statements in JavaScript don't have their own scope, the var
|
||||
declaration in the above snippet is made whether the `if` expression is truthy or not. If
|
||||
RequireJS is loaded then the declaration is superfluous because `define` is already already
|
||||
declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var`
|
||||
declarations of the same variable in the same scope gracefully.
|
||||
|
||||
If you want to deliver amdefine.js with your code rather than specifying it as a dependency
|
||||
with npm, then just download the latest release and refer to it using a relative path:
|
||||
|
||||
[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js)
|
||||
|
||||
### amdefine/intercept
|
||||
|
||||
Consider this very experimental.
|
||||
|
||||
Instead of pasting the piece of text for the amdefine setup of a `define`
|
||||
variable in each module you create or consume, you can use `amdefine/intercept`
|
||||
instead. It will automatically insert the above snippet in each .js file loaded
|
||||
by Node.
|
||||
|
||||
**Warning**: you should only use this if you are creating an application that
|
||||
is consuming AMD style defined()'d modules that are distributed via npm and want
|
||||
to run that code in Node.
|
||||
|
||||
For library code where you are not sure if it will be used by others in Node or
|
||||
in the browser, then explicitly depending on amdefine and placing the code
|
||||
snippet above is suggested path, instead of using `amdefine/intercept`. The
|
||||
intercept module affects all .js files loaded in the Node app, and it is
|
||||
inconsiderate to modify global state like that unless you are also controlling
|
||||
the top level app.
|
||||
|
||||
#### Why distribute AMD-style modules via npm?
|
||||
|
||||
npm has a lot of weaknesses for front-end use (installed layout is not great,
|
||||
should have better support for the `baseUrl + moduleID + '.js' style of loading,
|
||||
single file JS installs), but some people want a JS package manager and are
|
||||
willing to live with those constraints. If that is you, but still want to author
|
||||
in AMD style modules to get dynamic require([]), better direct source usage and
|
||||
powerful loader plugin support in the browser, then this tool can help.
|
||||
|
||||
#### amdefine/intercept usage
|
||||
|
||||
Just require it in your top level app module (for example index.js, server.js):
|
||||
|
||||
```javascript
|
||||
require('amdefine/intercept');
|
||||
```
|
||||
|
||||
The module does not return a value, so no need to assign the result to a local
|
||||
variable.
|
||||
|
||||
Then just require() code as you normally would with Node's require(). Any .js
|
||||
loaded after the intercept require will have the amdefine check injected in
|
||||
the .js source as it is loaded. It does not modify the source on disk, just
|
||||
prepends some content to the text of the module as it is loaded by Node.
|
||||
|
||||
#### How amdefine/intercept works
|
||||
|
||||
It overrides the `Module._extensions['.js']` in Node to automatically prepend
|
||||
the amdefine snippet above. So, it will affect any .js file loaded by your
|
||||
app.
|
||||
|
||||
## define() usage
|
||||
|
||||
It is best if you use the anonymous forms of define() in your module:
|
||||
|
||||
```javascript
|
||||
define(function (require) {
|
||||
var dependency = require('dependency');
|
||||
});
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```javascript
|
||||
define(['dependency'], function (dependency) {
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
## RequireJS optimizer integration. <a name="optimizer"></name>
|
||||
|
||||
Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html)
|
||||
will have support for stripping the `if (typeof define !== 'function')` check
|
||||
mentioned above, so you can include this snippet for code that runs in the
|
||||
browser, but avoid taking the cost of the if() statement once the code is
|
||||
optimized for deployment.
|
||||
|
||||
## Node 0.4 Support
|
||||
|
||||
If you want to support Node 0.4, then add `require` as the second parameter to amdefine:
|
||||
|
||||
```javascript
|
||||
//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.
|
||||
if (typeof define !== 'function') { var define = require('amdefine')(module, require) }
|
||||
```
|
||||
|
||||
## Limitations
|
||||
|
||||
### Synchronous vs Asynchronous
|
||||
|
||||
amdefine creates a define() function that is callable by your code. It will
|
||||
execute and trace dependencies and call the factory function *synchronously*,
|
||||
to keep the behavior in line with Node's synchronous dependency tracing.
|
||||
|
||||
The exception: calling AMD's callback-style require() from inside a factory
|
||||
function. The require callback is called on process.nextTick():
|
||||
|
||||
```javascript
|
||||
define(function (require) {
|
||||
require(['a'], function(a) {
|
||||
//'a' is loaded synchronously, but
|
||||
//this callback is called on process.nextTick().
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### Loader Plugins
|
||||
|
||||
Loader plugins are supported as long as they call their load() callbacks
|
||||
synchronously. So ones that do network requests will not work. However plugins
|
||||
like [text](http://requirejs.org/docs/api.html#text) can load text files locally.
|
||||
|
||||
The plugin API's `load.fromText()` is **not supported** in amdefine, so this means
|
||||
transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs)
|
||||
will not work. This may be fixable, but it is a bit complex, and I do not have
|
||||
enough node-fu to figure it out yet. See the source for amdefine.js if you want
|
||||
to get an idea of the issues involved.
|
||||
|
||||
## Tests
|
||||
|
||||
To run the tests, cd to **tests** and run:
|
||||
|
||||
```
|
||||
node all.js
|
||||
node all-intercept.js
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
New BSD and MIT. Check the LICENSE file for all the details.
|
301
node_modules/amdefine/amdefine.js
generated
vendored
301
node_modules/amdefine/amdefine.js
generated
vendored
@ -1,301 +0,0 @@
|
||||
/** vim: et:ts=4:sw=4:sts=4
|
||||
* @license amdefine 1.0.1 Copyright (c) 2011-2016, The Dojo Foundation All Rights Reserved.
|
||||
* Available via the MIT or new BSD license.
|
||||
* see: http://github.com/jrburke/amdefine for details
|
||||
*/
|
||||
|
||||
/*jslint node: true */
|
||||
/*global module, process */
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Creates a define for node.
|
||||
* @param {Object} module the "module" object that is defined by Node for the
|
||||
* current module.
|
||||
* @param {Function} [requireFn]. Node's require function for the current module.
|
||||
* It only needs to be passed in Node versions before 0.5, when module.require
|
||||
* did not exist.
|
||||
* @returns {Function} a define function that is usable for the current node
|
||||
* module.
|
||||
*/
|
||||
function amdefine(module, requireFn) {
|
||||
'use strict';
|
||||
var defineCache = {},
|
||||
loaderCache = {},
|
||||
alreadyCalled = false,
|
||||
path = require('path'),
|
||||
makeRequire, stringRequire;
|
||||
|
||||
/**
|
||||
* Trims the . and .. from an array of path segments.
|
||||
* It will keep a leading path segment if a .. will become
|
||||
* the first path segment, to help with module name lookups,
|
||||
* which act like paths, but can be remapped. But the end result,
|
||||
* all paths that use this function should look normalized.
|
||||
* NOTE: this method MODIFIES the input array.
|
||||
* @param {Array} ary the array of path segments.
|
||||
*/
|
||||
function trimDots(ary) {
|
||||
var i, part;
|
||||
for (i = 0; ary[i]; i+= 1) {
|
||||
part = ary[i];
|
||||
if (part === '.') {
|
||||
ary.splice(i, 1);
|
||||
i -= 1;
|
||||
} else if (part === '..') {
|
||||
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
|
||||
//End of the line. Keep at least one non-dot
|
||||
//path segment at the front so it can be mapped
|
||||
//correctly to disk. Otherwise, there is likely
|
||||
//no path mapping for a path starting with '..'.
|
||||
//This can still fail, but catches the most reasonable
|
||||
//uses of ..
|
||||
break;
|
||||
} else if (i > 0) {
|
||||
ary.splice(i - 1, 2);
|
||||
i -= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function normalize(name, baseName) {
|
||||
var baseParts;
|
||||
|
||||
//Adjust any relative paths.
|
||||
if (name && name.charAt(0) === '.') {
|
||||
//If have a base name, try to normalize against it,
|
||||
//otherwise, assume it is a top-level require that will
|
||||
//be relative to baseUrl in the end.
|
||||
if (baseName) {
|
||||
baseParts = baseName.split('/');
|
||||
baseParts = baseParts.slice(0, baseParts.length - 1);
|
||||
baseParts = baseParts.concat(name.split('/'));
|
||||
trimDots(baseParts);
|
||||
name = baseParts.join('/');
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the normalize() function passed to a loader plugin's
|
||||
* normalize method.
|
||||
*/
|
||||
function makeNormalize(relName) {
|
||||
return function (name) {
|
||||
return normalize(name, relName);
|
||||
};
|
||||
}
|
||||
|
||||
function makeLoad(id) {
|
||||
function load(value) {
|
||||
loaderCache[id] = value;
|
||||
}
|
||||
|
||||
load.fromText = function (id, text) {
|
||||
//This one is difficult because the text can/probably uses
|
||||
//define, and any relative paths and requires should be relative
|
||||
//to that id was it would be found on disk. But this would require
|
||||
//bootstrapping a module/require fairly deeply from node core.
|
||||
//Not sure how best to go about that yet.
|
||||
throw new Error('amdefine does not implement load.fromText');
|
||||
};
|
||||
|
||||
return load;
|
||||
}
|
||||
|
||||
makeRequire = function (systemRequire, exports, module, relId) {
|
||||
function amdRequire(deps, callback) {
|
||||
if (typeof deps === 'string') {
|
||||
//Synchronous, single module require('')
|
||||
return stringRequire(systemRequire, exports, module, deps, relId);
|
||||
} else {
|
||||
//Array of dependencies with a callback.
|
||||
|
||||
//Convert the dependencies to modules.
|
||||
deps = deps.map(function (depName) {
|
||||
return stringRequire(systemRequire, exports, module, depName, relId);
|
||||
});
|
||||
|
||||
//Wait for next tick to call back the require call.
|
||||
if (callback) {
|
||||
process.nextTick(function () {
|
||||
callback.apply(null, deps);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
amdRequire.toUrl = function (filePath) {
|
||||
if (filePath.indexOf('.') === 0) {
|
||||
return normalize(filePath, path.dirname(module.filename));
|
||||
} else {
|
||||
return filePath;
|
||||
}
|
||||
};
|
||||
|
||||
return amdRequire;
|
||||
};
|
||||
|
||||
//Favor explicit value, passed in if the module wants to support Node 0.4.
|
||||
requireFn = requireFn || function req() {
|
||||
return module.require.apply(module, arguments);
|
||||
};
|
||||
|
||||
function runFactory(id, deps, factory) {
|
||||
var r, e, m, result;
|
||||
|
||||
if (id) {
|
||||
e = loaderCache[id] = {};
|
||||
m = {
|
||||
id: id,
|
||||
uri: __filename,
|
||||
exports: e
|
||||
};
|
||||
r = makeRequire(requireFn, e, m, id);
|
||||
} else {
|
||||
//Only support one define call per file
|
||||
if (alreadyCalled) {
|
||||
throw new Error('amdefine with no module ID cannot be called more than once per file.');
|
||||
}
|
||||
alreadyCalled = true;
|
||||
|
||||
//Use the real variables from node
|
||||
//Use module.exports for exports, since
|
||||
//the exports in here is amdefine exports.
|
||||
e = module.exports;
|
||||
m = module;
|
||||
r = makeRequire(requireFn, e, m, module.id);
|
||||
}
|
||||
|
||||
//If there are dependencies, they are strings, so need
|
||||
//to convert them to dependency values.
|
||||
if (deps) {
|
||||
deps = deps.map(function (depName) {
|
||||
return r(depName);
|
||||
});
|
||||
}
|
||||
|
||||
//Call the factory with the right dependencies.
|
||||
if (typeof factory === 'function') {
|
||||
result = factory.apply(m.exports, deps);
|
||||
} else {
|
||||
result = factory;
|
||||
}
|
||||
|
||||
if (result !== undefined) {
|
||||
m.exports = result;
|
||||
if (id) {
|
||||
loaderCache[id] = m.exports;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stringRequire = function (systemRequire, exports, module, id, relId) {
|
||||
//Split the ID by a ! so that
|
||||
var index = id.indexOf('!'),
|
||||
originalId = id,
|
||||
prefix, plugin;
|
||||
|
||||
if (index === -1) {
|
||||
id = normalize(id, relId);
|
||||
|
||||
//Straight module lookup. If it is one of the special dependencies,
|
||||
//deal with it, otherwise, delegate to node.
|
||||
if (id === 'require') {
|
||||
return makeRequire(systemRequire, exports, module, relId);
|
||||
} else if (id === 'exports') {
|
||||
return exports;
|
||||
} else if (id === 'module') {
|
||||
return module;
|
||||
} else if (loaderCache.hasOwnProperty(id)) {
|
||||
return loaderCache[id];
|
||||
} else if (defineCache[id]) {
|
||||
runFactory.apply(null, defineCache[id]);
|
||||
return loaderCache[id];
|
||||
} else {
|
||||
if(systemRequire) {
|
||||
return systemRequire(originalId);
|
||||
} else {
|
||||
throw new Error('No module with ID: ' + id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//There is a plugin in play.
|
||||
prefix = id.substring(0, index);
|
||||
id = id.substring(index + 1, id.length);
|
||||
|
||||
plugin = stringRequire(systemRequire, exports, module, prefix, relId);
|
||||
|
||||
if (plugin.normalize) {
|
||||
id = plugin.normalize(id, makeNormalize(relId));
|
||||
} else {
|
||||
//Normalize the ID normally.
|
||||
id = normalize(id, relId);
|
||||
}
|
||||
|
||||
if (loaderCache[id]) {
|
||||
return loaderCache[id];
|
||||
} else {
|
||||
plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
|
||||
|
||||
return loaderCache[id];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//Create a define function specific to the module asking for amdefine.
|
||||
function define(id, deps, factory) {
|
||||
if (Array.isArray(id)) {
|
||||
factory = deps;
|
||||
deps = id;
|
||||
id = undefined;
|
||||
} else if (typeof id !== 'string') {
|
||||
factory = id;
|
||||
id = deps = undefined;
|
||||
}
|
||||
|
||||
if (deps && !Array.isArray(deps)) {
|
||||
factory = deps;
|
||||
deps = undefined;
|
||||
}
|
||||
|
||||
if (!deps) {
|
||||
deps = ['require', 'exports', 'module'];
|
||||
}
|
||||
|
||||
//Set up properties for this module. If an ID, then use
|
||||
//internal cache. If no ID, then use the external variables
|
||||
//for this node module.
|
||||
if (id) {
|
||||
//Put the module in deep freeze until there is a
|
||||
//require call for it.
|
||||
defineCache[id] = [id, deps, factory];
|
||||
} else {
|
||||
runFactory(id, deps, factory);
|
||||
}
|
||||
}
|
||||
|
||||
//define.require, which has access to all the values in the
|
||||
//cache. Useful for AMD modules that all have IDs in the file,
|
||||
//but need to finally export a value to node based on one of those
|
||||
//IDs.
|
||||
define.require = function (id) {
|
||||
if (loaderCache[id]) {
|
||||
return loaderCache[id];
|
||||
}
|
||||
|
||||
if (defineCache[id]) {
|
||||
runFactory.apply(null, defineCache[id]);
|
||||
return loaderCache[id];
|
||||
}
|
||||
};
|
||||
|
||||
define.amd = {};
|
||||
|
||||
return define;
|
||||
}
|
||||
|
||||
module.exports = amdefine;
|
36
node_modules/amdefine/intercept.js
generated
vendored
36
node_modules/amdefine/intercept.js
generated
vendored
@ -1,36 +0,0 @@
|
||||
/*jshint node: true */
|
||||
var inserted,
|
||||
Module = require('module'),
|
||||
fs = require('fs'),
|
||||
existingExtFn = Module._extensions['.js'],
|
||||
amdefineRegExp = /amdefine\.js/;
|
||||
|
||||
inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}";
|
||||
|
||||
//From the node/lib/module.js source:
|
||||
function stripBOM(content) {
|
||||
// Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
||||
// because the buffer-to-string conversion in `fs.readFileSync()`
|
||||
// translates it to FEFF, the UTF-16 BOM.
|
||||
if (content.charCodeAt(0) === 0xFEFF) {
|
||||
content = content.slice(1);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
//Also adapted from the node/lib/module.js source:
|
||||
function intercept(module, filename) {
|
||||
var content = stripBOM(fs.readFileSync(filename, 'utf8'));
|
||||
|
||||
if (!amdefineRegExp.test(module.id)) {
|
||||
content = inserted + content;
|
||||
}
|
||||
|
||||
module._compile(content, filename);
|
||||
}
|
||||
|
||||
intercept._id = 'amdefine/intercept';
|
||||
|
||||
if (!existingExtFn._id || existingExtFn._id !== intercept._id) {
|
||||
Module._extensions['.js'] = intercept;
|
||||
}
|
86
node_modules/amdefine/package.json
generated
vendored
86
node_modules/amdefine/package.json
generated
vendored
@ -1,86 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "amdefine@>=0.0.4",
|
||||
"scope": null,
|
||||
"escapedName": "amdefine",
|
||||
"name": "amdefine",
|
||||
"rawSpec": ">=0.0.4",
|
||||
"spec": ">=0.0.4",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\clean-css\\node_modules\\source-map"
|
||||
]
|
||||
],
|
||||
"_from": "amdefine@>=0.0.4",
|
||||
"_id": "amdefine@1.0.1",
|
||||
"_inCache": true,
|
||||
"_location": "/amdefine",
|
||||
"_nodeVersion": "6.7.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/amdefine-1.0.1.tgz_1478062849665_0.19916908955201507"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "jrburke",
|
||||
"email": "jrburke@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.10.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "amdefine@>=0.0.4",
|
||||
"scope": null,
|
||||
"escapedName": "amdefine",
|
||||
"name": "amdefine",
|
||||
"rawSpec": ">=0.0.4",
|
||||
"spec": ">=0.0.4",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/clean-css/source-map"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
|
||||
"_shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "amdefine@>=0.0.4",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\clean-css\\node_modules\\source-map",
|
||||
"author": {
|
||||
"name": "James Burke",
|
||||
"email": "jrburke@gmail.com",
|
||||
"url": "http://github.com/jrburke"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jrburke/amdefine/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Provide AMD's define() API for declaring modules in the AMD format",
|
||||
"devDependencies": {},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5",
|
||||
"tarball": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.2"
|
||||
},
|
||||
"gitHead": "e59edc9da24404ec7937098e3992f8fb0e260be7",
|
||||
"homepage": "http://github.com/jrburke/amdefine",
|
||||
"license": "BSD-3-Clause OR MIT",
|
||||
"main": "./amdefine.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jrburke",
|
||||
"email": "jrburke@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "amdefine",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jrburke/amdefine.git"
|
||||
},
|
||||
"scripts": {},
|
||||
"version": "1.0.1"
|
||||
}
|
4
node_modules/ansi-regex/index.js
generated
vendored
4
node_modules/ansi-regex/index.js
generated
vendored
@ -1,4 +0,0 @@
|
||||
'use strict';
|
||||
module.exports = function () {
|
||||
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
|
||||
};
|
21
node_modules/ansi-regex/license
generated
vendored
21
node_modules/ansi-regex/license
generated
vendored
@ -1,21 +0,0 @@
|
||||
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.
|
121
node_modules/ansi-regex/package.json
generated
vendored
121
node_modules/ansi-regex/package.json
generated
vendored
@ -1,121 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "ansi-regex@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "ansi-regex",
|
||||
"name": "ansi-regex",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\has-ansi"
|
||||
]
|
||||
],
|
||||
"_from": "ansi-regex@>=2.0.0 <3.0.0",
|
||||
"_id": "ansi-regex@2.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/ansi-regex",
|
||||
"_nodeVersion": "0.12.5",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.11.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "ansi-regex@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "ansi-regex",
|
||||
"name": "ansi-regex",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/has-ansi",
|
||||
"/strip-ansi"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz",
|
||||
"_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "ansi-regex@^2.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\has-ansi",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/ansi-regex/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Regular expression for matching ANSI escape codes",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107",
|
||||
"tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f",
|
||||
"homepage": "https://github.com/sindresorhus/ansi-regex",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"text",
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"match",
|
||||
"test",
|
||||
"find",
|
||||
"pattern"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"name": "ansi-regex",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/ansi-regex.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha test/test.js",
|
||||
"view-supported": "node test/viewCodes.js"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
31
node_modules/ansi-regex/readme.md
generated
vendored
31
node_modules/ansi-regex/readme.md
generated
vendored
@ -1,31 +0,0 @@
|
||||
# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)
|
||||
|
||||
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-regex
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001b[4mcake\u001b[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
|
||||
//=> ['\u001b[4m', '\u001b[0m']
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
65
node_modules/ansi-styles/index.js
generated
vendored
65
node_modules/ansi-styles/index.js
generated
vendored
@ -1,65 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
function assembleStyles () {
|
||||
var styles = {
|
||||
modifiers: {
|
||||
reset: [0, 0],
|
||||
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
|
||||
dim: [2, 22],
|
||||
italic: [3, 23],
|
||||
underline: [4, 24],
|
||||
inverse: [7, 27],
|
||||
hidden: [8, 28],
|
||||
strikethrough: [9, 29]
|
||||
},
|
||||
colors: {
|
||||
black: [30, 39],
|
||||
red: [31, 39],
|
||||
green: [32, 39],
|
||||
yellow: [33, 39],
|
||||
blue: [34, 39],
|
||||
magenta: [35, 39],
|
||||
cyan: [36, 39],
|
||||
white: [37, 39],
|
||||
gray: [90, 39]
|
||||
},
|
||||
bgColors: {
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
bgYellow: [43, 49],
|
||||
bgBlue: [44, 49],
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49]
|
||||
}
|
||||
};
|
||||
|
||||
// fix humans
|
||||
styles.colors.grey = styles.colors.gray;
|
||||
|
||||
Object.keys(styles).forEach(function (groupName) {
|
||||
var group = styles[groupName];
|
||||
|
||||
Object.keys(group).forEach(function (styleName) {
|
||||
var style = group[styleName];
|
||||
|
||||
styles[styleName] = group[styleName] = {
|
||||
open: '\u001b[' + style[0] + 'm',
|
||||
close: '\u001b[' + style[1] + 'm'
|
||||
};
|
||||
});
|
||||
|
||||
Object.defineProperty(styles, groupName, {
|
||||
value: group,
|
||||
enumerable: false
|
||||
});
|
||||
});
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
Object.defineProperty(module, 'exports', {
|
||||
enumerable: true,
|
||||
get: assembleStyles
|
||||
});
|
21
node_modules/ansi-styles/license
generated
vendored
21
node_modules/ansi-styles/license
generated
vendored
@ -1,21 +0,0 @@
|
||||
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.
|
114
node_modules/ansi-styles/package.json
generated
vendored
114
node_modules/ansi-styles/package.json
generated
vendored
@ -1,114 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "ansi-styles@^2.2.1",
|
||||
"scope": null,
|
||||
"escapedName": "ansi-styles",
|
||||
"name": "ansi-styles",
|
||||
"rawSpec": "^2.2.1",
|
||||
"spec": ">=2.2.1 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\chalk"
|
||||
]
|
||||
],
|
||||
"_from": "ansi-styles@>=2.2.1 <3.0.0",
|
||||
"_id": "ansi-styles@2.2.1",
|
||||
"_inCache": true,
|
||||
"_location": "/ansi-styles",
|
||||
"_nodeVersion": "4.3.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/ansi-styles-2.2.1.tgz_1459197317833_0.9694824463222176"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.8.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "ansi-styles@^2.2.1",
|
||||
"scope": null,
|
||||
"escapedName": "ansi-styles",
|
||||
"name": "ansi-styles",
|
||||
"rawSpec": "^2.2.1",
|
||||
"spec": ">=2.2.1 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/chalk"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "ansi-styles@^2.2.1",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\chalk",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-styles/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "ANSI escape codes for styling strings in the terminal",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
|
||||
"tarball": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "95c59b23be760108b6530ca1c89477c21b258032",
|
||||
"homepage": "https://github.com/chalk/ansi-styles#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "ansi-styles",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/ansi-styles.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.2.1"
|
||||
}
|
86
node_modules/ansi-styles/readme.md
generated
vendored
86
node_modules/ansi-styles/readme.md
generated
vendored
@ -1,86 +0,0 @@
|
||||
# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
|
||||
|
||||
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
||||
|
||||
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
|
||||
|
||||
![](screenshot.png)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-styles
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ansi = require('ansi-styles');
|
||||
|
||||
console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
Each style has an `open` and `close` property.
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset`
|
||||
- `bold`
|
||||
- `dim`
|
||||
- `italic` *(not widely supported)*
|
||||
- `underline`
|
||||
- `inverse`
|
||||
- `hidden`
|
||||
- `strikethrough` *(not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
|
||||
|
||||
## Advanced usage
|
||||
|
||||
By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
||||
|
||||
- `ansi.modifiers`
|
||||
- `ansi.colors`
|
||||
- `ansi.bgColors`
|
||||
|
||||
|
||||
###### Example
|
||||
|
||||
```js
|
||||
console.log(ansi.colors.green.open);
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
4
node_modules/archy/.travis.yml
generated
vendored
4
node_modules/archy/.travis.yml
generated
vendored
@ -1,4 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.6
|
||||
- 0.8
|
18
node_modules/archy/LICENSE
generated
vendored
18
node_modules/archy/LICENSE
generated
vendored
@ -1,18 +0,0 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
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.
|
24
node_modules/archy/examples/beep.js
generated
vendored
24
node_modules/archy/examples/beep.js
generated
vendored
@ -1,24 +0,0 @@
|
||||
var archy = require('../');
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log(s);
|
25
node_modules/archy/examples/multi_line.js
generated
vendored
25
node_modules/archy/examples/multi_line.js
generated
vendored
@ -1,25 +0,0 @@
|
||||
var archy = require('../');
|
||||
|
||||
var s = archy({
|
||||
label : 'beep\none\ntwo',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O\nwheee',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny\nmeat' ]
|
||||
},
|
||||
'creature'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log(s);
|
35
node_modules/archy/index.js
generated
vendored
35
node_modules/archy/index.js
generated
vendored
@ -1,35 +0,0 @@
|
||||
module.exports = function archy (obj, prefix, opts) {
|
||||
if (prefix === undefined) prefix = '';
|
||||
if (!opts) opts = {};
|
||||
var chr = function (s) {
|
||||
var chars = {
|
||||
'│' : '|',
|
||||
'└' : '`',
|
||||
'├' : '+',
|
||||
'─' : '-',
|
||||
'┬' : '-'
|
||||
};
|
||||
return opts.unicode === false ? chars[s] : s;
|
||||
};
|
||||
|
||||
if (typeof obj === 'string') obj = { label : obj };
|
||||
|
||||
var nodes = obj.nodes || [];
|
||||
var lines = (obj.label || '').split('\n');
|
||||
var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' ';
|
||||
|
||||
return prefix
|
||||
+ lines.join(splitter) + '\n'
|
||||
+ nodes.map(function (node, ix) {
|
||||
var last = ix === nodes.length - 1;
|
||||
var more = node.nodes && node.nodes.length;
|
||||
var prefix_ = prefix + (last ? ' ' : chr('│')) + ' ';
|
||||
|
||||
return prefix
|
||||
+ (last ? chr('└') : chr('├')) + chr('─')
|
||||
+ (more ? chr('┬') : chr('─')) + ' '
|
||||
+ archy(node, prefix_, opts).slice(prefix.length + 2)
|
||||
;
|
||||
}).join('')
|
||||
;
|
||||
};
|
114
node_modules/archy/package.json
generated
vendored
114
node_modules/archy/package.json
generated
vendored
@ -1,114 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "archy@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "archy",
|
||||
"name": "archy",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\gulp"
|
||||
]
|
||||
],
|
||||
"_from": "archy@>=1.0.0 <2.0.0",
|
||||
"_id": "archy@1.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/archy",
|
||||
"_npmUser": {
|
||||
"name": "substack",
|
||||
"email": "mail@substack.net"
|
||||
},
|
||||
"_npmVersion": "1.4.25",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "archy@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "archy",
|
||||
"name": "archy",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
|
||||
"_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "archy@^1.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\gulp",
|
||||
"author": {
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/substack/node-archy/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "render nested hierarchies `npm ls` style with unicode pipes",
|
||||
"devDependencies": {
|
||||
"tap": "~0.3.3",
|
||||
"tape": "~0.1.1"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40",
|
||||
"tarball": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz"
|
||||
},
|
||||
"gitHead": "30223c16191e877bf027b15b12daf077b9b55b84",
|
||||
"homepage": "https://github.com/substack/node-archy",
|
||||
"keywords": [
|
||||
"hierarchy",
|
||||
"npm ls",
|
||||
"unicode",
|
||||
"pretty",
|
||||
"print"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "substack",
|
||||
"email": "mail@substack.net"
|
||||
}
|
||||
],
|
||||
"name": "archy",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/substack/node-archy.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": {
|
||||
"iexplore": [
|
||||
"6.0",
|
||||
"7.0",
|
||||
"8.0",
|
||||
"9.0"
|
||||
],
|
||||
"chrome": [
|
||||
"20.0"
|
||||
],
|
||||
"firefox": [
|
||||
"10.0",
|
||||
"15.0"
|
||||
],
|
||||
"safari": [
|
||||
"5.1"
|
||||
],
|
||||
"opera": [
|
||||
"12.0"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
88
node_modules/archy/readme.markdown
generated
vendored
88
node_modules/archy/readme.markdown
generated
vendored
@ -1,88 +0,0 @@
|
||||
# archy
|
||||
|
||||
Render nested hierarchies `npm ls` style with unicode pipes.
|
||||
|
||||
[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy)
|
||||
|
||||
[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy)
|
||||
|
||||
# example
|
||||
|
||||
``` js
|
||||
var archy = require('archy');
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log(s);
|
||||
```
|
||||
|
||||
output
|
||||
|
||||
```
|
||||
beep
|
||||
├── ity
|
||||
└─┬ boop
|
||||
├─┬ o_O
|
||||
│ ├─┬ oh
|
||||
│ │ ├── hello
|
||||
│ │ └── puny
|
||||
│ └── human
|
||||
└── party
|
||||
time!
|
||||
```
|
||||
|
||||
# methods
|
||||
|
||||
var archy = require('archy')
|
||||
|
||||
## archy(obj, prefix='', opts={})
|
||||
|
||||
Return a string representation of `obj` with unicode pipe characters like how
|
||||
`npm ls` looks.
|
||||
|
||||
`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields.
|
||||
`'label'` is a string of text to display at a node level and `'nodes'` is an
|
||||
array of the descendents of the current node.
|
||||
|
||||
If a node is a string, that string will be used as the `'label'` and an empty
|
||||
array of `'nodes'` will be used.
|
||||
|
||||
`prefix` gets prepended to all the lines and is used by the algorithm to
|
||||
recursively update.
|
||||
|
||||
If `'label'` has newlines they will be indented at the present indentation level
|
||||
with the current prefix.
|
||||
|
||||
To disable unicode results in favor of all-ansi output set `opts.unicode` to
|
||||
`false`.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](http://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install archy
|
||||
```
|
||||
|
||||
# license
|
||||
|
||||
MIT
|
40
node_modules/archy/test/beep.js
generated
vendored
40
node_modules/archy/test/beep.js
generated
vendored
@ -1,40 +0,0 @@
|
||||
var test = require('tape');
|
||||
var archy = require('../');
|
||||
|
||||
test('beep', function (t) {
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
t.equal(s, [
|
||||
'beep',
|
||||
'├── ity',
|
||||
'└─┬ boop',
|
||||
' ├─┬ o_O',
|
||||
' │ ├─┬ oh',
|
||||
' │ │ ├── hello',
|
||||
' │ │ └── puny',
|
||||
' │ └── human',
|
||||
' └── party!',
|
||||
''
|
||||
].join('\n'));
|
||||
t.end();
|
||||
});
|
45
node_modules/archy/test/multi_line.js
generated
vendored
45
node_modules/archy/test/multi_line.js
generated
vendored
@ -1,45 +0,0 @@
|
||||
var test = require('tape');
|
||||
var archy = require('../');
|
||||
|
||||
test('multi-line', function (t) {
|
||||
var s = archy({
|
||||
label : 'beep\none\ntwo',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O\nwheee',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny\nmeat' ]
|
||||
},
|
||||
'creature'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
t.equal(s, [
|
||||
'beep',
|
||||
'│ one',
|
||||
'│ two',
|
||||
'├── ity',
|
||||
'└─┬ boop',
|
||||
' ├─┬ o_O',
|
||||
' │ │ wheee',
|
||||
' │ ├─┬ oh',
|
||||
' │ │ ├── hello',
|
||||
' │ │ └── puny',
|
||||
' │ │ meat',
|
||||
' │ └── creature',
|
||||
' └── party',
|
||||
' time!',
|
||||
''
|
||||
].join('\n'));
|
||||
t.end();
|
||||
});
|
40
node_modules/archy/test/non_unicode.js
generated
vendored
40
node_modules/archy/test/non_unicode.js
generated
vendored
@ -1,40 +0,0 @@
|
||||
var test = require('tape');
|
||||
var archy = require('../');
|
||||
|
||||
test('beep', function (t) {
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party!'
|
||||
]
|
||||
}
|
||||
]
|
||||
}, '', { unicode : false });
|
||||
t.equal(s, [
|
||||
'beep',
|
||||
'+-- ity',
|
||||
'`-- boop',
|
||||
' +-- o_O',
|
||||
' | +-- oh',
|
||||
' | | +-- hello',
|
||||
' | | `-- puny',
|
||||
' | `-- human',
|
||||
' `-- party!',
|
||||
''
|
||||
].join('\n'));
|
||||
t.end();
|
||||
});
|
21
node_modules/arr-diff/LICENSE
generated
vendored
21
node_modules/arr-diff/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
|
||||
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.
|
74
node_modules/arr-diff/README.md
generated
vendored
74
node_modules/arr-diff/README.md
generated
vendored
@ -1,74 +0,0 @@
|
||||
# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base)
|
||||
|
||||
> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i arr-diff --save
|
||||
```
|
||||
Install with [bower](http://bower.io/)
|
||||
|
||||
```sh
|
||||
$ bower install arr-diff --save
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### [diff](index.js#L33)
|
||||
|
||||
Return the difference between the first array and additional arrays.
|
||||
|
||||
**Params**
|
||||
|
||||
* `a` **{Array}**
|
||||
* `b` **{Array}**
|
||||
* `returns` **{Array}**
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
var diff = require('arr-diff');
|
||||
|
||||
var a = ['a', 'b', 'c', 'd'];
|
||||
var b = ['b', 'c'];
|
||||
|
||||
console.log(diff(a, b))
|
||||
//=> ['a', 'd']
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten)
|
||||
* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter)
|
||||
* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection)
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new).
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._
|
58
node_modules/arr-diff/index.js
generated
vendored
58
node_modules/arr-diff/index.js
generated
vendored
@ -1,58 +0,0 @@
|
||||
/*!
|
||||
* arr-diff <https://github.com/jonschlinkert/arr-diff>
|
||||
*
|
||||
* Copyright (c) 2014 Jon Schlinkert, contributors.
|
||||
* Licensed under the MIT License
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var flatten = require('arr-flatten');
|
||||
var slice = [].slice;
|
||||
|
||||
/**
|
||||
* Return the difference between the first array and
|
||||
* additional arrays.
|
||||
*
|
||||
* ```js
|
||||
* var diff = require('{%= name %}');
|
||||
*
|
||||
* var a = ['a', 'b', 'c', 'd'];
|
||||
* var b = ['b', 'c'];
|
||||
*
|
||||
* console.log(diff(a, b))
|
||||
* //=> ['a', 'd']
|
||||
* ```
|
||||
*
|
||||
* @param {Array} `a`
|
||||
* @param {Array} `b`
|
||||
* @return {Array}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function diff(arr, arrays) {
|
||||
var argsLen = arguments.length;
|
||||
var len = arr.length, i = -1;
|
||||
var res = [], arrays;
|
||||
|
||||
if (argsLen === 1) {
|
||||
return arr;
|
||||
}
|
||||
|
||||
if (argsLen > 2) {
|
||||
arrays = flatten(slice.call(arguments, 1));
|
||||
}
|
||||
|
||||
while (++i < len) {
|
||||
if (!~arrays.indexOf(arr[i])) {
|
||||
res.push(arr[i]);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose `diff`
|
||||
*/
|
||||
|
||||
module.exports = diff;
|
119
node_modules/arr-diff/package.json
generated
vendored
119
node_modules/arr-diff/package.json
generated
vendored
@ -1,119 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "arr-diff@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "arr-diff",
|
||||
"name": "arr-diff",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\micromatch"
|
||||
]
|
||||
],
|
||||
"_from": "arr-diff@>=2.0.0 <3.0.0",
|
||||
"_id": "arr-diff@2.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/arr-diff",
|
||||
"_nodeVersion": "5.0.0",
|
||||
"_npmUser": {
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
"_npmVersion": "3.3.6",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "arr-diff@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "arr-diff",
|
||||
"name": "arr-diff",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/micromatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
|
||||
"_shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "arr-diff@^2.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\micromatch",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-diff/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"arr-flatten": "^1.0.1"
|
||||
},
|
||||
"description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.",
|
||||
"devDependencies": {
|
||||
"array-differ": "^1.0.0",
|
||||
"array-slice": "^0.2.3",
|
||||
"benchmarked": "^0.1.4",
|
||||
"chalk": "^1.1.1",
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf",
|
||||
"tarball": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "b89f54eb88ca51afd0e0ea6be9a4a63e5ccecf27",
|
||||
"homepage": "https://github.com/jonschlinkert/arr-diff",
|
||||
"keywords": [
|
||||
"arr",
|
||||
"array",
|
||||
"diff",
|
||||
"differ",
|
||||
"difference"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "doowb",
|
||||
"email": "brian.woodward@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
{
|
||||
"name": "paulmillr",
|
||||
"email": "paul@paulmillr.com"
|
||||
}
|
||||
],
|
||||
"name": "arr-diff",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/arr-diff.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-flatten",
|
||||
"array-filter",
|
||||
"array-intersection"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
21
node_modules/arr-flatten/LICENSE
generated
vendored
21
node_modules/arr-flatten/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
|
||||
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.
|
73
node_modules/arr-flatten/README.md
generated
vendored
73
node_modules/arr-flatten/README.md
generated
vendored
@ -1,73 +0,0 @@
|
||||
# arr-flatten [![NPM version](https://badge.fury.io/js/arr-flatten.svg)](http://badge.fury.io/js/arr-flatten) [![Build Status](https://travis-ci.org/jonschlinkert/arr-flatten.svg)](https://travis-ci.org/jonschlinkert/arr-flatten)
|
||||
|
||||
> Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
|
||||
|
||||
Why another flatten utility? I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.
|
||||
|
||||
## Run benchmarks
|
||||
|
||||
```bash
|
||||
npm run benchmarks
|
||||
```
|
||||
|
||||
Benchmark results comparing this library to [array-flatten]:
|
||||
|
||||
```bash
|
||||
#1: large.js
|
||||
arr-flatten.js x 487,030 ops/sec ±0.67% (92 runs sampled)
|
||||
array-flatten.js x 347,020 ops/sec ±0.57% (98 runs sampled)
|
||||
|
||||
#2: medium.js
|
||||
arr-flatten.js x 1,914,516 ops/sec ±0.76% (94 runs sampled)
|
||||
array-flatten.js x 1,391,661 ops/sec ±0.63% (96 runs sampled)
|
||||
|
||||
#3: small.js
|
||||
arr-flatten.js x 5,158,980 ops/sec ±0.85% (94 runs sampled)
|
||||
array-flatten.js x 3,683,173 ops/sec ±0.79% (97 runs sampled)
|
||||
```
|
||||
|
||||
## Run tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```bash
|
||||
npm i -d && npm test
|
||||
```
|
||||
|
||||
## Install with [npm](npmjs.org)
|
||||
|
||||
```bash
|
||||
npm i arr-flatten --save
|
||||
```
|
||||
### Install with [bower](https://github.com/bower/bower)
|
||||
|
||||
```bash
|
||||
bower install arr-flatten --save
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var flatten = require('arr-flatten');
|
||||
|
||||
flatten(['a', ['b', ['c']], 'd', ['e']]);
|
||||
//=> ['a', 'b', 'c', 'd', 'e']
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
Copyright (c) 2014-2015 Jon Schlinkert
|
||||
Released under the MIT license
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 11, 2015._
|
||||
|
||||
[array-flatten]: https://github.com/blakeembrey/array-flatten
|
27
node_modules/arr-flatten/index.js
generated
vendored
27
node_modules/arr-flatten/index.js
generated
vendored
@ -1,27 +0,0 @@
|
||||
/*!
|
||||
* arr-flatten <https://github.com/jonschlinkert/arr-flatten>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function flatten(arr) {
|
||||
return flat(arr, []);
|
||||
};
|
||||
|
||||
function flat(arr, res) {
|
||||
var len = arr.length;
|
||||
var i = -1;
|
||||
|
||||
while (len--) {
|
||||
var cur = arr[++i];
|
||||
if (Array.isArray(cur)) {
|
||||
flat(cur, res);
|
||||
} else {
|
||||
res.push(cur);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
108
node_modules/arr-flatten/package.json
generated
vendored
108
node_modules/arr-flatten/package.json
generated
vendored
@ -1,108 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "arr-flatten@^1.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "arr-flatten",
|
||||
"name": "arr-flatten",
|
||||
"rawSpec": "^1.0.1",
|
||||
"spec": ">=1.0.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\arr-diff"
|
||||
]
|
||||
],
|
||||
"_from": "arr-flatten@>=1.0.1 <2.0.0",
|
||||
"_id": "arr-flatten@1.0.1",
|
||||
"_inCache": true,
|
||||
"_location": "/arr-flatten",
|
||||
"_nodeVersion": "0.12.0",
|
||||
"_npmUser": {
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
"_npmVersion": "2.5.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "arr-flatten@^1.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "arr-flatten",
|
||||
"name": "arr-flatten",
|
||||
"rawSpec": "^1.0.1",
|
||||
"spec": ">=1.0.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/arr-diff"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz",
|
||||
"_shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "arr-flatten@^1.0.1",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\arr-diff",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-flatten/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.",
|
||||
"devDependencies": {
|
||||
"array-flatten": "^1.0.2",
|
||||
"array-slice": "^0.2.2",
|
||||
"benchmarked": "^0.1.3",
|
||||
"chalk": "^0.5.1",
|
||||
"glob": "^4.3.5",
|
||||
"kind-of": "^1.0.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b",
|
||||
"tarball": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "7b3706eaa0093d8f5ba65af8ed590b6fcb3fe7cf",
|
||||
"homepage": "https://github.com/jonschlinkert/arr-flatten",
|
||||
"keywords": [
|
||||
"arr",
|
||||
"array",
|
||||
"elements",
|
||||
"flat",
|
||||
"flatten",
|
||||
"nested",
|
||||
"recurse",
|
||||
"recursive",
|
||||
"recursively"
|
||||
],
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/jonschlinkert/arr-flatten/blob/master/LICENSE"
|
||||
},
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
}
|
||||
],
|
||||
"name": "arr-flatten",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jonschlinkert/arr-flatten.git"
|
||||
},
|
||||
"scripts": {
|
||||
"benchmarks": "node benchmark",
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
7
node_modules/array-differ/index.js
generated
vendored
7
node_modules/array-differ/index.js
generated
vendored
@ -1,7 +0,0 @@
|
||||
'use strict';
|
||||
module.exports = function (arr) {
|
||||
var rest = [].concat.apply([], [].slice.call(arguments, 1));
|
||||
return arr.filter(function (el) {
|
||||
return rest.indexOf(el) === -1;
|
||||
});
|
||||
};
|
95
node_modules/array-differ/package.json
generated
vendored
95
node_modules/array-differ/package.json
generated
vendored
@ -1,95 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "array-differ@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "array-differ",
|
||||
"name": "array-differ",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\gulp-util"
|
||||
]
|
||||
],
|
||||
"_from": "array-differ@>=1.0.0 <2.0.0",
|
||||
"_id": "array-differ@1.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/array-differ",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "1.4.14",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "array-differ@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "array-differ",
|
||||
"name": "array-differ",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
|
||||
"_shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "array-differ@^1.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\gulp-util",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/array-differ/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Create an array with values that are present in the first input array but not additional ones",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031",
|
||||
"tarball": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "e91802976c4710eef8dea2090d48e48525cf41b1",
|
||||
"homepage": "https://github.com/sindresorhus/array-differ",
|
||||
"keywords": [
|
||||
"array",
|
||||
"difference",
|
||||
"diff",
|
||||
"differ",
|
||||
"filter",
|
||||
"exclude"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "array-differ",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/sindresorhus/array-differ.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
41
node_modules/array-differ/readme.md
generated
vendored
41
node_modules/array-differ/readme.md
generated
vendored
@ -1,41 +0,0 @@
|
||||
# array-differ [![Build Status](https://travis-ci.org/sindresorhus/array-differ.svg?branch=master)](https://travis-ci.org/sindresorhus/array-differ)
|
||||
|
||||
> Create an array with values that are present in the first input array but not additional ones
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save array-differ
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var arrayDiffer = require('array-differ');
|
||||
|
||||
arrayDiffer([2, 3, 4], [3, 50]);
|
||||
//=> [2, 4]
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### arrayDiffer(input, values, [values, ...])
|
||||
|
||||
Returns the new array.
|
||||
|
||||
#### input
|
||||
|
||||
Type: `array`
|
||||
|
||||
#### values
|
||||
|
||||
Type: `array`
|
||||
|
||||
Arrays of values to exclude.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
6
node_modules/array-union/index.js
generated
vendored
6
node_modules/array-union/index.js
generated
vendored
@ -1,6 +0,0 @@
|
||||
'use strict';
|
||||
var arrayUniq = require('array-uniq');
|
||||
|
||||
module.exports = function () {
|
||||
return arrayUniq([].concat.apply([], arguments));
|
||||
};
|
21
node_modules/array-union/license
generated
vendored
21
node_modules/array-union/license
generated
vendored
@ -1,21 +0,0 @@
|
||||
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.
|
107
node_modules/array-union/package.json
generated
vendored
107
node_modules/array-union/package.json
generated
vendored
@ -1,107 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "array-union@^1.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "array-union",
|
||||
"name": "array-union",
|
||||
"rawSpec": "^1.0.1",
|
||||
"spec": ">=1.0.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\globby"
|
||||
]
|
||||
],
|
||||
"_from": "array-union@>=1.0.1 <2.0.0",
|
||||
"_id": "array-union@1.0.2",
|
||||
"_inCache": true,
|
||||
"_location": "/array-union",
|
||||
"_nodeVersion": "4.4.2",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/array-union-1.0.2.tgz_1466079411551_0.23353995219804347"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "array-union@^1.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "array-union",
|
||||
"name": "array-union",
|
||||
"rawSpec": "^1.0.1",
|
||||
"spec": ">=1.0.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/globby"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
|
||||
"_shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "array-union@^1.0.1",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\globby",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/array-union/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"array-uniq": "^1.0.1"
|
||||
},
|
||||
"description": "Create an array of unique values, in order, from the input arrays",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39",
|
||||
"tarball": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "34e1d6a80baa4eac9723795a0674c14119ace1bd",
|
||||
"homepage": "https://github.com/sindresorhus/array-union#readme",
|
||||
"keywords": [
|
||||
"array",
|
||||
"arr",
|
||||
"set",
|
||||
"uniq",
|
||||
"unique",
|
||||
"duplicate",
|
||||
"remove",
|
||||
"union",
|
||||
"combine",
|
||||
"merge"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "array-union",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/array-union.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.2"
|
||||
}
|
28
node_modules/array-union/readme.md
generated
vendored
28
node_modules/array-union/readme.md
generated
vendored
@ -1,28 +0,0 @@
|
||||
# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union)
|
||||
|
||||
> Create an array of unique values, in order, from the input arrays
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save array-union
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const arrayUnion = require('array-union');
|
||||
|
||||
arrayUnion([1, 1, 2, 3], [2, 3]);
|
||||
//=> [1, 2, 3]
|
||||
|
||||
arrayUnion(['foo', 'foo', 'bar'], ['foo']);
|
||||
//=> ['foo', 'bar']
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
62
node_modules/array-uniq/index.js
generated
vendored
62
node_modules/array-uniq/index.js
generated
vendored
@ -1,62 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
// there's 3 implementations written in increasing order of efficiency
|
||||
|
||||
// 1 - no Set type is defined
|
||||
function uniqNoSet(arr) {
|
||||
var ret = [];
|
||||
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (ret.indexOf(arr[i]) === -1) {
|
||||
ret.push(arr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// 2 - a simple Set type is defined
|
||||
function uniqSet(arr) {
|
||||
var seen = new Set();
|
||||
return arr.filter(function (el) {
|
||||
if (!seen.has(el)) {
|
||||
seen.add(el);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// 3 - a standard Set type is defined and it has a forEach method
|
||||
function uniqSetWithForEach(arr) {
|
||||
var ret = [];
|
||||
|
||||
(new Set(arr)).forEach(function (el) {
|
||||
ret.push(el);
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// V8 currently has a broken implementation
|
||||
// https://github.com/joyent/node/issues/8449
|
||||
function doesForEachActuallyWork() {
|
||||
var ret = false;
|
||||
|
||||
(new Set([true])).forEach(function (el) {
|
||||
ret = el;
|
||||
});
|
||||
|
||||
return ret === true;
|
||||
}
|
||||
|
||||
if ('Set' in global) {
|
||||
if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) {
|
||||
module.exports = uniqSetWithForEach;
|
||||
} else {
|
||||
module.exports = uniqSet;
|
||||
}
|
||||
} else {
|
||||
module.exports = uniqNoSet;
|
||||
}
|
21
node_modules/array-uniq/license
generated
vendored
21
node_modules/array-uniq/license
generated
vendored
@ -1,21 +0,0 @@
|
||||
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.
|
106
node_modules/array-uniq/package.json
generated
vendored
106
node_modules/array-uniq/package.json
generated
vendored
@ -1,106 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "array-uniq@^1.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "array-uniq",
|
||||
"name": "array-uniq",
|
||||
"rawSpec": "^1.0.1",
|
||||
"spec": ">=1.0.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\array-union"
|
||||
]
|
||||
],
|
||||
"_from": "array-uniq@>=1.0.1 <2.0.0",
|
||||
"_id": "array-uniq@1.0.3",
|
||||
"_inCache": true,
|
||||
"_location": "/array-uniq",
|
||||
"_nodeVersion": "4.4.2",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/array-uniq-1.0.3.tgz_1466079716839_0.9139188586268574"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "array-uniq@^1.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "array-uniq",
|
||||
"name": "array-uniq",
|
||||
"rawSpec": "^1.0.1",
|
||||
"spec": ">=1.0.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/array-union",
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
|
||||
"_shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "array-uniq@^1.0.1",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\array-union",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/array-uniq/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Create an array without duplicates",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"es6-set": "^0.1.0",
|
||||
"require-uncached": "^1.0.2",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6",
|
||||
"tarball": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "3b5bf5a90a585b3950284d575f33d09663f6083a",
|
||||
"homepage": "https://github.com/sindresorhus/array-uniq#readme",
|
||||
"keywords": [
|
||||
"array",
|
||||
"arr",
|
||||
"set",
|
||||
"uniq",
|
||||
"unique",
|
||||
"es6",
|
||||
"duplicate",
|
||||
"remove"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "array-uniq",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/array-uniq.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.3"
|
||||
}
|
30
node_modules/array-uniq/readme.md
generated
vendored
30
node_modules/array-uniq/readme.md
generated
vendored
@ -1,30 +0,0 @@
|
||||
# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq)
|
||||
|
||||
> Create an array without duplicates
|
||||
|
||||
It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays).
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save array-uniq
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const arrayUniq = require('array-uniq');
|
||||
|
||||
arrayUniq([1, 1, 2, 3, 3]);
|
||||
//=> [1, 2, 3]
|
||||
|
||||
arrayUniq(['foo', 'foo', 'bar', 'foo']);
|
||||
//=> ['foo', 'bar']
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
21
node_modules/array-unique/LICENSE
generated
vendored
21
node_modules/array-unique/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
|
||||
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.
|
51
node_modules/array-unique/README.md
generated
vendored
51
node_modules/array-unique/README.md
generated
vendored
@ -1,51 +0,0 @@
|
||||
# array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique)
|
||||
|
||||
> Return an array free of duplicate values. Fastest ES5 implementation.
|
||||
|
||||
## Install with [npm](npmjs.org)
|
||||
|
||||
```bash
|
||||
npm i array-unique --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var unique = require('array-unique');
|
||||
|
||||
unique(['a', 'b', 'c', 'c']);
|
||||
//=> ['a', 'b', 'c']
|
||||
```
|
||||
|
||||
## Related
|
||||
* [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
|
||||
* [arr-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons.
|
||||
* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
|
||||
* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements.
|
||||
* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map.
|
||||
* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection.
|
||||
|
||||
## Run tests
|
||||
Install dev dependencies.
|
||||
|
||||
```bash
|
||||
npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-unique/issues)
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
Copyright (c) 2015 Jon Schlinkert
|
||||
Released under the MIT license
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._
|
28
node_modules/array-unique/index.js
generated
vendored
28
node_modules/array-unique/index.js
generated
vendored
@ -1,28 +0,0 @@
|
||||
/*!
|
||||
* array-unique <https://github.com/jonschlinkert/array-unique>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function unique(arr) {
|
||||
if (!Array.isArray(arr)) {
|
||||
throw new TypeError('array-unique expects an array.');
|
||||
}
|
||||
|
||||
var len = arr.length;
|
||||
var i = -1;
|
||||
|
||||
while (i++ < len) {
|
||||
var j = i + 1;
|
||||
|
||||
for (; j < arr.length; ++j) {
|
||||
if (arr[i] === arr[j]) {
|
||||
arr.splice(j--, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
};
|
94
node_modules/array-unique/package.json
generated
vendored
94
node_modules/array-unique/package.json
generated
vendored
@ -1,94 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "array-unique@^0.2.1",
|
||||
"scope": null,
|
||||
"escapedName": "array-unique",
|
||||
"name": "array-unique",
|
||||
"rawSpec": "^0.2.1",
|
||||
"spec": ">=0.2.1 <0.3.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\micromatch"
|
||||
]
|
||||
],
|
||||
"_from": "array-unique@>=0.2.1 <0.3.0",
|
||||
"_id": "array-unique@0.2.1",
|
||||
"_inCache": true,
|
||||
"_location": "/array-unique",
|
||||
"_nodeVersion": "1.6.2",
|
||||
"_npmUser": {
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
"_npmVersion": "2.7.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "array-unique@^0.2.1",
|
||||
"scope": null,
|
||||
"escapedName": "array-unique",
|
||||
"name": "array-unique",
|
||||
"rawSpec": "^0.2.1",
|
||||
"spec": ">=0.2.1 <0.3.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/micromatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
|
||||
"_shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "array-unique@^0.2.1",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\micromatch",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/array-unique/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Return an array free of duplicate values. Fastest ES5 implementation.",
|
||||
"devDependencies": {
|
||||
"array-uniq": "^1.0.2",
|
||||
"benchmarked": "^0.1.3",
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53",
|
||||
"tarball": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "36fde8e586fb7cf880b8b3aa6515df889e64ed85",
|
||||
"homepage": "https://github.com/jonschlinkert/array-unique",
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/jonschlinkert/array-unique/blob/master/LICENSE"
|
||||
},
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
}
|
||||
],
|
||||
"name": "array-unique",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jonschlinkert/array-unique.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.2.1"
|
||||
}
|
8
node_modules/arrify/index.js
generated
vendored
8
node_modules/arrify/index.js
generated
vendored
@ -1,8 +0,0 @@
|
||||
'use strict';
|
||||
module.exports = function (val) {
|
||||
if (val === null || val === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return Array.isArray(val) ? val : [val];
|
||||
};
|
21
node_modules/arrify/license
generated
vendored
21
node_modules/arrify/license
generated
vendored
@ -1,21 +0,0 @@
|
||||
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.
|
97
node_modules/arrify/package.json
generated
vendored
97
node_modules/arrify/package.json
generated
vendored
@ -1,97 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "arrify@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "arrify",
|
||||
"name": "arrify",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\globby"
|
||||
]
|
||||
],
|
||||
"_from": "arrify@>=1.0.0 <2.0.0",
|
||||
"_id": "arrify@1.0.1",
|
||||
"_inCache": true,
|
||||
"_location": "/arrify",
|
||||
"_nodeVersion": "4.2.1",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.5.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "arrify@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "arrify",
|
||||
"name": "arrify",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/globby"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
||||
"_shasum": "898508da2226f380df904728456849c1501a4b0d",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "arrify@^1.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\globby",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/arrify/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Convert a value to an array",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "898508da2226f380df904728456849c1501a4b0d",
|
||||
"tarball": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "087edee1a58d5adaac6cae5a107886121ef43783",
|
||||
"homepage": "https://github.com/sindresorhus/arrify#readme",
|
||||
"keywords": [
|
||||
"array",
|
||||
"arr",
|
||||
"arrify",
|
||||
"arrayify",
|
||||
"convert",
|
||||
"value"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "arrify",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/arrify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
36
node_modules/arrify/readme.md
generated
vendored
36
node_modules/arrify/readme.md
generated
vendored
@ -1,36 +0,0 @@
|
||||
# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify)
|
||||
|
||||
> Convert a value to an array
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save arrify
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const arrify = require('arrify');
|
||||
|
||||
arrify('unicorn');
|
||||
//=> ['unicorn']
|
||||
|
||||
arrify(['unicorn']);
|
||||
//=> ['unicorn']
|
||||
|
||||
arrify(null);
|
||||
//=> []
|
||||
|
||||
arrify(undefined);
|
||||
//=> []
|
||||
```
|
||||
|
||||
*Supplying `null` or `undefined` results in an empty array.*
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
19
node_modules/async/LICENSE
generated
vendored
19
node_modules/async/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
||||
Copyright (c) 2010 Caolan McMahon
|
||||
|
||||
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.
|
1425
node_modules/async/README.md
generated
vendored
1425
node_modules/async/README.md
generated
vendored
File diff suppressed because it is too large
Load Diff
11
node_modules/async/component.json
generated
vendored
11
node_modules/async/component.json
generated
vendored
@ -1,11 +0,0 @@
|
||||
{
|
||||
"name": "async",
|
||||
"repo": "caolan/async",
|
||||
"description": "Higher-order functions and common patterns for asynchronous code",
|
||||
"version": "0.1.23",
|
||||
"keywords": [],
|
||||
"dependencies": {},
|
||||
"development": {},
|
||||
"main": "lib/async.js",
|
||||
"scripts": [ "lib/async.js" ]
|
||||
}
|
958
node_modules/async/lib/async.js
generated
vendored
958
node_modules/async/lib/async.js
generated
vendored
@ -1,958 +0,0 @@
|
||||
/*global setImmediate: false, setTimeout: false, console: false */
|
||||
(function () {
|
||||
|
||||
var async = {};
|
||||
|
||||
// global on the server, window in the browser
|
||||
var root, previous_async;
|
||||
|
||||
root = this;
|
||||
if (root != null) {
|
||||
previous_async = root.async;
|
||||
}
|
||||
|
||||
async.noConflict = function () {
|
||||
root.async = previous_async;
|
||||
return async;
|
||||
};
|
||||
|
||||
function only_once(fn) {
|
||||
var called = false;
|
||||
return function() {
|
||||
if (called) throw new Error("Callback was already called.");
|
||||
called = true;
|
||||
fn.apply(root, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
//// cross-browser compatiblity functions ////
|
||||
|
||||
var _each = function (arr, iterator) {
|
||||
if (arr.forEach) {
|
||||
return arr.forEach(iterator);
|
||||
}
|
||||
for (var i = 0; i < arr.length; i += 1) {
|
||||
iterator(arr[i], i, arr);
|
||||
}
|
||||
};
|
||||
|
||||
var _map = function (arr, iterator) {
|
||||
if (arr.map) {
|
||||
return arr.map(iterator);
|
||||
}
|
||||
var results = [];
|
||||
_each(arr, function (x, i, a) {
|
||||
results.push(iterator(x, i, a));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
var _reduce = function (arr, iterator, memo) {
|
||||
if (arr.reduce) {
|
||||
return arr.reduce(iterator, memo);
|
||||
}
|
||||
_each(arr, function (x, i, a) {
|
||||
memo = iterator(memo, x, i, a);
|
||||
});
|
||||
return memo;
|
||||
};
|
||||
|
||||
var _keys = function (obj) {
|
||||
if (Object.keys) {
|
||||
return Object.keys(obj);
|
||||
}
|
||||
var keys = [];
|
||||
for (var k in obj) {
|
||||
if (obj.hasOwnProperty(k)) {
|
||||
keys.push(k);
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
};
|
||||
|
||||
//// exported async module functions ////
|
||||
|
||||
//// nextTick implementation with browser-compatible fallback ////
|
||||
if (typeof process === 'undefined' || !(process.nextTick)) {
|
||||
if (typeof setImmediate === 'function') {
|
||||
async.nextTick = function (fn) {
|
||||
// not a direct alias for IE10 compatibility
|
||||
setImmediate(fn);
|
||||
};
|
||||
async.setImmediate = async.nextTick;
|
||||
}
|
||||
else {
|
||||
async.nextTick = function (fn) {
|
||||
setTimeout(fn, 0);
|
||||
};
|
||||
async.setImmediate = async.nextTick;
|
||||
}
|
||||
}
|
||||
else {
|
||||
async.nextTick = process.nextTick;
|
||||
if (typeof setImmediate !== 'undefined') {
|
||||
async.setImmediate = function (fn) {
|
||||
// not a direct alias for IE10 compatibility
|
||||
setImmediate(fn);
|
||||
};
|
||||
}
|
||||
else {
|
||||
async.setImmediate = async.nextTick;
|
||||
}
|
||||
}
|
||||
|
||||
async.each = function (arr, iterator, callback) {
|
||||
callback = callback || function () {};
|
||||
if (!arr.length) {
|
||||
return callback();
|
||||
}
|
||||
var completed = 0;
|
||||
_each(arr, function (x) {
|
||||
iterator(x, only_once(function (err) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
callback = function () {};
|
||||
}
|
||||
else {
|
||||
completed += 1;
|
||||
if (completed >= arr.length) {
|
||||
callback(null);
|
||||
}
|
||||
}
|
||||
}));
|
||||
});
|
||||
};
|
||||
async.forEach = async.each;
|
||||
|
||||
async.eachSeries = function (arr, iterator, callback) {
|
||||
callback = callback || function () {};
|
||||
if (!arr.length) {
|
||||
return callback();
|
||||
}
|
||||
var completed = 0;
|
||||
var iterate = function () {
|
||||
iterator(arr[completed], function (err) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
callback = function () {};
|
||||
}
|
||||
else {
|
||||
completed += 1;
|
||||
if (completed >= arr.length) {
|
||||
callback(null);
|
||||
}
|
||||
else {
|
||||
iterate();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
iterate();
|
||||
};
|
||||
async.forEachSeries = async.eachSeries;
|
||||
|
||||
async.eachLimit = function (arr, limit, iterator, callback) {
|
||||
var fn = _eachLimit(limit);
|
||||
fn.apply(null, [arr, iterator, callback]);
|
||||
};
|
||||
async.forEachLimit = async.eachLimit;
|
||||
|
||||
var _eachLimit = function (limit) {
|
||||
|
||||
return function (arr, iterator, callback) {
|
||||
callback = callback || function () {};
|
||||
if (!arr.length || limit <= 0) {
|
||||
return callback();
|
||||
}
|
||||
var completed = 0;
|
||||
var started = 0;
|
||||
var running = 0;
|
||||
|
||||
(function replenish () {
|
||||
if (completed >= arr.length) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
while (running < limit && started < arr.length) {
|
||||
started += 1;
|
||||
running += 1;
|
||||
iterator(arr[started - 1], function (err) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
callback = function () {};
|
||||
}
|
||||
else {
|
||||
completed += 1;
|
||||
running -= 1;
|
||||
if (completed >= arr.length) {
|
||||
callback();
|
||||
}
|
||||
else {
|
||||
replenish();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
var doParallel = function (fn) {
|
||||
return function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
return fn.apply(null, [async.each].concat(args));
|
||||
};
|
||||
};
|
||||
var doParallelLimit = function(limit, fn) {
|
||||
return function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
return fn.apply(null, [_eachLimit(limit)].concat(args));
|
||||
};
|
||||
};
|
||||
var doSeries = function (fn) {
|
||||
return function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
return fn.apply(null, [async.eachSeries].concat(args));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
var _asyncMap = function (eachfn, arr, iterator, callback) {
|
||||
var results = [];
|
||||
arr = _map(arr, function (x, i) {
|
||||
return {index: i, value: x};
|
||||
});
|
||||
eachfn(arr, function (x, callback) {
|
||||
iterator(x.value, function (err, v) {
|
||||
results[x.index] = v;
|
||||
callback(err);
|
||||
});
|
||||
}, function (err) {
|
||||
callback(err, results);
|
||||
});
|
||||
};
|
||||
async.map = doParallel(_asyncMap);
|
||||
async.mapSeries = doSeries(_asyncMap);
|
||||
async.mapLimit = function (arr, limit, iterator, callback) {
|
||||
return _mapLimit(limit)(arr, iterator, callback);
|
||||
};
|
||||
|
||||
var _mapLimit = function(limit) {
|
||||
return doParallelLimit(limit, _asyncMap);
|
||||
};
|
||||
|
||||
// reduce only has a series version, as doing reduce in parallel won't
|
||||
// work in many situations.
|
||||
async.reduce = function (arr, memo, iterator, callback) {
|
||||
async.eachSeries(arr, function (x, callback) {
|
||||
iterator(memo, x, function (err, v) {
|
||||
memo = v;
|
||||
callback(err);
|
||||
});
|
||||
}, function (err) {
|
||||
callback(err, memo);
|
||||
});
|
||||
};
|
||||
// inject alias
|
||||
async.inject = async.reduce;
|
||||
// foldl alias
|
||||
async.foldl = async.reduce;
|
||||
|
||||
async.reduceRight = function (arr, memo, iterator, callback) {
|
||||
var reversed = _map(arr, function (x) {
|
||||
return x;
|
||||
}).reverse();
|
||||
async.reduce(reversed, memo, iterator, callback);
|
||||
};
|
||||
// foldr alias
|
||||
async.foldr = async.reduceRight;
|
||||
|
||||
var _filter = function (eachfn, arr, iterator, callback) {
|
||||
var results = [];
|
||||
arr = _map(arr, function (x, i) {
|
||||
return {index: i, value: x};
|
||||
});
|
||||
eachfn(arr, function (x, callback) {
|
||||
iterator(x.value, function (v) {
|
||||
if (v) {
|
||||
results.push(x);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
}, function (err) {
|
||||
callback(_map(results.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
}), function (x) {
|
||||
return x.value;
|
||||
}));
|
||||
});
|
||||
};
|
||||
async.filter = doParallel(_filter);
|
||||
async.filterSeries = doSeries(_filter);
|
||||
// select alias
|
||||
async.select = async.filter;
|
||||
async.selectSeries = async.filterSeries;
|
||||
|
||||
var _reject = function (eachfn, arr, iterator, callback) {
|
||||
var results = [];
|
||||
arr = _map(arr, function (x, i) {
|
||||
return {index: i, value: x};
|
||||
});
|
||||
eachfn(arr, function (x, callback) {
|
||||
iterator(x.value, function (v) {
|
||||
if (!v) {
|
||||
results.push(x);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
}, function (err) {
|
||||
callback(_map(results.sort(function (a, b) {
|
||||
return a.index - b.index;
|
||||
}), function (x) {
|
||||
return x.value;
|
||||
}));
|
||||
});
|
||||
};
|
||||
async.reject = doParallel(_reject);
|
||||
async.rejectSeries = doSeries(_reject);
|
||||
|
||||
var _detect = function (eachfn, arr, iterator, main_callback) {
|
||||
eachfn(arr, function (x, callback) {
|
||||
iterator(x, function (result) {
|
||||
if (result) {
|
||||
main_callback(x);
|
||||
main_callback = function () {};
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}, function (err) {
|
||||
main_callback();
|
||||
});
|
||||
};
|
||||
async.detect = doParallel(_detect);
|
||||
async.detectSeries = doSeries(_detect);
|
||||
|
||||
async.some = function (arr, iterator, main_callback) {
|
||||
async.each(arr, function (x, callback) {
|
||||
iterator(x, function (v) {
|
||||
if (v) {
|
||||
main_callback(true);
|
||||
main_callback = function () {};
|
||||
}
|
||||
callback();
|
||||
});
|
||||
}, function (err) {
|
||||
main_callback(false);
|
||||
});
|
||||
};
|
||||
// any alias
|
||||
async.any = async.some;
|
||||
|
||||
async.every = function (arr, iterator, main_callback) {
|
||||
async.each(arr, function (x, callback) {
|
||||
iterator(x, function (v) {
|
||||
if (!v) {
|
||||
main_callback(false);
|
||||
main_callback = function () {};
|
||||
}
|
||||
callback();
|
||||
});
|
||||
}, function (err) {
|
||||
main_callback(true);
|
||||
});
|
||||
};
|
||||
// all alias
|
||||
async.all = async.every;
|
||||
|
||||
async.sortBy = function (arr, iterator, callback) {
|
||||
async.map(arr, function (x, callback) {
|
||||
iterator(x, function (err, criteria) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
}
|
||||
else {
|
||||
callback(null, {value: x, criteria: criteria});
|
||||
}
|
||||
});
|
||||
}, function (err, results) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
else {
|
||||
var fn = function (left, right) {
|
||||
var a = left.criteria, b = right.criteria;
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
};
|
||||
callback(null, _map(results.sort(fn), function (x) {
|
||||
return x.value;
|
||||
}));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
async.auto = function (tasks, callback) {
|
||||
callback = callback || function () {};
|
||||
var keys = _keys(tasks);
|
||||
if (!keys.length) {
|
||||
return callback(null);
|
||||
}
|
||||
|
||||
var results = {};
|
||||
|
||||
var listeners = [];
|
||||
var addListener = function (fn) {
|
||||
listeners.unshift(fn);
|
||||
};
|
||||
var removeListener = function (fn) {
|
||||
for (var i = 0; i < listeners.length; i += 1) {
|
||||
if (listeners[i] === fn) {
|
||||
listeners.splice(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
var taskComplete = function () {
|
||||
_each(listeners.slice(0), function (fn) {
|
||||
fn();
|
||||
});
|
||||
};
|
||||
|
||||
addListener(function () {
|
||||
if (_keys(results).length === keys.length) {
|
||||
callback(null, results);
|
||||
callback = function () {};
|
||||
}
|
||||
});
|
||||
|
||||
_each(keys, function (k) {
|
||||
var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k];
|
||||
var taskCallback = function (err) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
if (args.length <= 1) {
|
||||
args = args[0];
|
||||
}
|
||||
if (err) {
|
||||
var safeResults = {};
|
||||
_each(_keys(results), function(rkey) {
|
||||
safeResults[rkey] = results[rkey];
|
||||
});
|
||||
safeResults[k] = args;
|
||||
callback(err, safeResults);
|
||||
// stop subsequent errors hitting callback multiple times
|
||||
callback = function () {};
|
||||
}
|
||||
else {
|
||||
results[k] = args;
|
||||
async.setImmediate(taskComplete);
|
||||
}
|
||||
};
|
||||
var requires = task.slice(0, Math.abs(task.length - 1)) || [];
|
||||
var ready = function () {
|
||||
return _reduce(requires, function (a, x) {
|
||||
return (a && results.hasOwnProperty(x));
|
||||
}, true) && !results.hasOwnProperty(k);
|
||||
};
|
||||
if (ready()) {
|
||||
task[task.length - 1](taskCallback, results);
|
||||
}
|
||||
else {
|
||||
var listener = function () {
|
||||
if (ready()) {
|
||||
removeListener(listener);
|
||||
task[task.length - 1](taskCallback, results);
|
||||
}
|
||||
};
|
||||
addListener(listener);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
async.waterfall = function (tasks, callback) {
|
||||
callback = callback || function () {};
|
||||
if (tasks.constructor !== Array) {
|
||||
var err = new Error('First argument to waterfall must be an array of functions');
|
||||
return callback(err);
|
||||
}
|
||||
if (!tasks.length) {
|
||||
return callback();
|
||||
}
|
||||
var wrapIterator = function (iterator) {
|
||||
return function (err) {
|
||||
if (err) {
|
||||
callback.apply(null, arguments);
|
||||
callback = function () {};
|
||||
}
|
||||
else {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
var next = iterator.next();
|
||||
if (next) {
|
||||
args.push(wrapIterator(next));
|
||||
}
|
||||
else {
|
||||
args.push(callback);
|
||||
}
|
||||
async.setImmediate(function () {
|
||||
iterator.apply(null, args);
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
wrapIterator(async.iterator(tasks))();
|
||||
};
|
||||
|
||||
var _parallel = function(eachfn, tasks, callback) {
|
||||
callback = callback || function () {};
|
||||
if (tasks.constructor === Array) {
|
||||
eachfn.map(tasks, function (fn, callback) {
|
||||
if (fn) {
|
||||
fn(function (err) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
if (args.length <= 1) {
|
||||
args = args[0];
|
||||
}
|
||||
callback.call(null, err, args);
|
||||
});
|
||||
}
|
||||
}, callback);
|
||||
}
|
||||
else {
|
||||
var results = {};
|
||||
eachfn.each(_keys(tasks), function (k, callback) {
|
||||
tasks[k](function (err) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
if (args.length <= 1) {
|
||||
args = args[0];
|
||||
}
|
||||
results[k] = args;
|
||||
callback(err);
|
||||
});
|
||||
}, function (err) {
|
||||
callback(err, results);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
async.parallel = function (tasks, callback) {
|
||||
_parallel({ map: async.map, each: async.each }, tasks, callback);
|
||||
};
|
||||
|
||||
async.parallelLimit = function(tasks, limit, callback) {
|
||||
_parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback);
|
||||
};
|
||||
|
||||
async.series = function (tasks, callback) {
|
||||
callback = callback || function () {};
|
||||
if (tasks.constructor === Array) {
|
||||
async.mapSeries(tasks, function (fn, callback) {
|
||||
if (fn) {
|
||||
fn(function (err) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
if (args.length <= 1) {
|
||||
args = args[0];
|
||||
}
|
||||
callback.call(null, err, args);
|
||||
});
|
||||
}
|
||||
}, callback);
|
||||
}
|
||||
else {
|
||||
var results = {};
|
||||
async.eachSeries(_keys(tasks), function (k, callback) {
|
||||
tasks[k](function (err) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
if (args.length <= 1) {
|
||||
args = args[0];
|
||||
}
|
||||
results[k] = args;
|
||||
callback(err);
|
||||
});
|
||||
}, function (err) {
|
||||
callback(err, results);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
async.iterator = function (tasks) {
|
||||
var makeCallback = function (index) {
|
||||
var fn = function () {
|
||||
if (tasks.length) {
|
||||
tasks[index].apply(null, arguments);
|
||||
}
|
||||
return fn.next();
|
||||
};
|
||||
fn.next = function () {
|
||||
return (index < tasks.length - 1) ? makeCallback(index + 1): null;
|
||||
};
|
||||
return fn;
|
||||
};
|
||||
return makeCallback(0);
|
||||
};
|
||||
|
||||
async.apply = function (fn) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
return function () {
|
||||
return fn.apply(
|
||||
null, args.concat(Array.prototype.slice.call(arguments))
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
var _concat = function (eachfn, arr, fn, callback) {
|
||||
var r = [];
|
||||
eachfn(arr, function (x, cb) {
|
||||
fn(x, function (err, y) {
|
||||
r = r.concat(y || []);
|
||||
cb(err);
|
||||
});
|
||||
}, function (err) {
|
||||
callback(err, r);
|
||||
});
|
||||
};
|
||||
async.concat = doParallel(_concat);
|
||||
async.concatSeries = doSeries(_concat);
|
||||
|
||||
async.whilst = function (test, iterator, callback) {
|
||||
if (test()) {
|
||||
iterator(function (err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
async.whilst(test, iterator, callback);
|
||||
});
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
async.doWhilst = function (iterator, test, callback) {
|
||||
iterator(function (err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
if (test()) {
|
||||
async.doWhilst(iterator, test, callback);
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
async.until = function (test, iterator, callback) {
|
||||
if (!test()) {
|
||||
iterator(function (err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
async.until(test, iterator, callback);
|
||||
});
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
async.doUntil = function (iterator, test, callback) {
|
||||
iterator(function (err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
if (!test()) {
|
||||
async.doUntil(iterator, test, callback);
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
async.queue = function (worker, concurrency) {
|
||||
if (concurrency === undefined) {
|
||||
concurrency = 1;
|
||||
}
|
||||
function _insert(q, data, pos, callback) {
|
||||
if(data.constructor !== Array) {
|
||||
data = [data];
|
||||
}
|
||||
_each(data, function(task) {
|
||||
var item = {
|
||||
data: task,
|
||||
callback: typeof callback === 'function' ? callback : null
|
||||
};
|
||||
|
||||
if (pos) {
|
||||
q.tasks.unshift(item);
|
||||
} else {
|
||||
q.tasks.push(item);
|
||||
}
|
||||
|
||||
if (q.saturated && q.tasks.length === concurrency) {
|
||||
q.saturated();
|
||||
}
|
||||
async.setImmediate(q.process);
|
||||
});
|
||||
}
|
||||
|
||||
var workers = 0;
|
||||
var q = {
|
||||
tasks: [],
|
||||
concurrency: concurrency,
|
||||
saturated: null,
|
||||
empty: null,
|
||||
drain: null,
|
||||
push: function (data, callback) {
|
||||
_insert(q, data, false, callback);
|
||||
},
|
||||
unshift: function (data, callback) {
|
||||
_insert(q, data, true, callback);
|
||||
},
|
||||
process: function () {
|
||||
if (workers < q.concurrency && q.tasks.length) {
|
||||
var task = q.tasks.shift();
|
||||
if (q.empty && q.tasks.length === 0) {
|
||||
q.empty();
|
||||
}
|
||||
workers += 1;
|
||||
var next = function () {
|
||||
workers -= 1;
|
||||
if (task.callback) {
|
||||
task.callback.apply(task, arguments);
|
||||
}
|
||||
if (q.drain && q.tasks.length + workers === 0) {
|
||||
q.drain();
|
||||
}
|
||||
q.process();
|
||||
};
|
||||
var cb = only_once(next);
|
||||
worker(task.data, cb);
|
||||
}
|
||||
},
|
||||
length: function () {
|
||||
return q.tasks.length;
|
||||
},
|
||||
running: function () {
|
||||
return workers;
|
||||
}
|
||||
};
|
||||
return q;
|
||||
};
|
||||
|
||||
async.cargo = function (worker, payload) {
|
||||
var working = false,
|
||||
tasks = [];
|
||||
|
||||
var cargo = {
|
||||
tasks: tasks,
|
||||
payload: payload,
|
||||
saturated: null,
|
||||
empty: null,
|
||||
drain: null,
|
||||
push: function (data, callback) {
|
||||
if(data.constructor !== Array) {
|
||||
data = [data];
|
||||
}
|
||||
_each(data, function(task) {
|
||||
tasks.push({
|
||||
data: task,
|
||||
callback: typeof callback === 'function' ? callback : null
|
||||
});
|
||||
if (cargo.saturated && tasks.length === payload) {
|
||||
cargo.saturated();
|
||||
}
|
||||
});
|
||||
async.setImmediate(cargo.process);
|
||||
},
|
||||
process: function process() {
|
||||
if (working) return;
|
||||
if (tasks.length === 0) {
|
||||
if(cargo.drain) cargo.drain();
|
||||
return;
|
||||
}
|
||||
|
||||
var ts = typeof payload === 'number'
|
||||
? tasks.splice(0, payload)
|
||||
: tasks.splice(0);
|
||||
|
||||
var ds = _map(ts, function (task) {
|
||||
return task.data;
|
||||
});
|
||||
|
||||
if(cargo.empty) cargo.empty();
|
||||
working = true;
|
||||
worker(ds, function () {
|
||||
working = false;
|
||||
|
||||
var args = arguments;
|
||||
_each(ts, function (data) {
|
||||
if (data.callback) {
|
||||
data.callback.apply(null, args);
|
||||
}
|
||||
});
|
||||
|
||||
process();
|
||||
});
|
||||
},
|
||||
length: function () {
|
||||
return tasks.length;
|
||||
},
|
||||
running: function () {
|
||||
return working;
|
||||
}
|
||||
};
|
||||
return cargo;
|
||||
};
|
||||
|
||||
var _console_fn = function (name) {
|
||||
return function (fn) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
fn.apply(null, args.concat([function (err) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
if (typeof console !== 'undefined') {
|
||||
if (err) {
|
||||
if (console.error) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
else if (console[name]) {
|
||||
_each(args, function (x) {
|
||||
console[name](x);
|
||||
});
|
||||
}
|
||||
}
|
||||
}]));
|
||||
};
|
||||
};
|
||||
async.log = _console_fn('log');
|
||||
async.dir = _console_fn('dir');
|
||||
/*async.info = _console_fn('info');
|
||||
async.warn = _console_fn('warn');
|
||||
async.error = _console_fn('error');*/
|
||||
|
||||
async.memoize = function (fn, hasher) {
|
||||
var memo = {};
|
||||
var queues = {};
|
||||
hasher = hasher || function (x) {
|
||||
return x;
|
||||
};
|
||||
var memoized = function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var callback = args.pop();
|
||||
var key = hasher.apply(null, args);
|
||||
if (key in memo) {
|
||||
callback.apply(null, memo[key]);
|
||||
}
|
||||
else if (key in queues) {
|
||||
queues[key].push(callback);
|
||||
}
|
||||
else {
|
||||
queues[key] = [callback];
|
||||
fn.apply(null, args.concat([function () {
|
||||
memo[key] = arguments;
|
||||
var q = queues[key];
|
||||
delete queues[key];
|
||||
for (var i = 0, l = q.length; i < l; i++) {
|
||||
q[i].apply(null, arguments);
|
||||
}
|
||||
}]));
|
||||
}
|
||||
};
|
||||
memoized.memo = memo;
|
||||
memoized.unmemoized = fn;
|
||||
return memoized;
|
||||
};
|
||||
|
||||
async.unmemoize = function (fn) {
|
||||
return function () {
|
||||
return (fn.unmemoized || fn).apply(null, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
async.times = function (count, iterator, callback) {
|
||||
var counter = [];
|
||||
for (var i = 0; i < count; i++) {
|
||||
counter.push(i);
|
||||
}
|
||||
return async.map(counter, iterator, callback);
|
||||
};
|
||||
|
||||
async.timesSeries = function (count, iterator, callback) {
|
||||
var counter = [];
|
||||
for (var i = 0; i < count; i++) {
|
||||
counter.push(i);
|
||||
}
|
||||
return async.mapSeries(counter, iterator, callback);
|
||||
};
|
||||
|
||||
async.compose = function (/* functions... */) {
|
||||
var fns = Array.prototype.reverse.call(arguments);
|
||||
return function () {
|
||||
var that = this;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var callback = args.pop();
|
||||
async.reduce(fns, args, function (newargs, fn, cb) {
|
||||
fn.apply(that, newargs.concat([function () {
|
||||
var err = arguments[0];
|
||||
var nextargs = Array.prototype.slice.call(arguments, 1);
|
||||
cb(err, nextargs);
|
||||
}]))
|
||||
},
|
||||
function (err, results) {
|
||||
callback.apply(that, [err].concat(results));
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var _applyEach = function (eachfn, fns /*args...*/) {
|
||||
var go = function () {
|
||||
var that = this;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var callback = args.pop();
|
||||
return eachfn(fns, function (fn, cb) {
|
||||
fn.apply(that, args.concat([cb]));
|
||||
},
|
||||
callback);
|
||||
};
|
||||
if (arguments.length > 2) {
|
||||
var args = Array.prototype.slice.call(arguments, 2);
|
||||
return go.apply(this, args);
|
||||
}
|
||||
else {
|
||||
return go;
|
||||
}
|
||||
};
|
||||
async.applyEach = doParallel(_applyEach);
|
||||
async.applyEachSeries = doSeries(_applyEach);
|
||||
|
||||
async.forever = function (fn, callback) {
|
||||
function next(err) {
|
||||
if (err) {
|
||||
if (callback) {
|
||||
return callback(err);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
fn(next);
|
||||
}
|
||||
next();
|
||||
};
|
||||
|
||||
// AMD / RequireJS
|
||||
if (typeof define !== 'undefined' && define.amd) {
|
||||
define([], function () {
|
||||
return async;
|
||||
});
|
||||
}
|
||||
// Node.js
|
||||
else if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = async;
|
||||
}
|
||||
// included directly via <script> tag
|
||||
else {
|
||||
root.async = async;
|
||||
}
|
||||
|
||||
}());
|
94
node_modules/async/package.json
generated
vendored
94
node_modules/async/package.json
generated
vendored
@ -1,94 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "async@~0.2.6",
|
||||
"scope": null,
|
||||
"escapedName": "async",
|
||||
"name": "async",
|
||||
"rawSpec": "~0.2.6",
|
||||
"spec": ">=0.2.6 <0.3.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\uglify-js"
|
||||
]
|
||||
],
|
||||
"_from": "async@>=0.2.6 <0.3.0",
|
||||
"_id": "async@0.2.10",
|
||||
"_inCache": true,
|
||||
"_location": "/async",
|
||||
"_npmUser": {
|
||||
"name": "caolan",
|
||||
"email": "caolan.mcmahon@gmail.com"
|
||||
},
|
||||
"_npmVersion": "1.3.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "async@~0.2.6",
|
||||
"scope": null,
|
||||
"escapedName": "async",
|
||||
"name": "async",
|
||||
"rawSpec": "~0.2.6",
|
||||
"spec": ">=0.2.6 <0.3.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/uglify-js"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
|
||||
"_shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "async@~0.2.6",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\uglify-js",
|
||||
"author": {
|
||||
"name": "Caolan McMahon"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/caolan/async/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Higher-order functions and common patterns for asynchronous code",
|
||||
"devDependencies": {
|
||||
"nodelint": ">0.0.0",
|
||||
"nodeunit": ">0.0.0",
|
||||
"uglify-js": "1.2.x"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "b6bbe0b0674b9d719708ca38de8c237cb526c3d1",
|
||||
"tarball": "https://registry.npmjs.org/async/-/async-0.2.10.tgz"
|
||||
},
|
||||
"homepage": "https://github.com/caolan/async#readme",
|
||||
"jam": {
|
||||
"main": "lib/async.js",
|
||||
"include": [
|
||||
"lib/async.js",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
]
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/caolan/async/raw/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"main": "./lib/async",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "caolan",
|
||||
"email": "caolan@caolanmcmahon.com"
|
||||
}
|
||||
],
|
||||
"name": "async",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/caolan/async.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "nodeunit test/test-async.js"
|
||||
},
|
||||
"version": "0.2.10"
|
||||
}
|
5
node_modules/balanced-match/.npmignore
generated
vendored
5
node_modules/balanced-match/.npmignore
generated
vendored
@ -1,5 +0,0 @@
|
||||
test
|
||||
.gitignore
|
||||
.travis.yml
|
||||
Makefile
|
||||
example.js
|
21
node_modules/balanced-match/LICENSE.md
generated
vendored
21
node_modules/balanced-match/LICENSE.md
generated
vendored
@ -1,21 +0,0 @@
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
91
node_modules/balanced-match/README.md
generated
vendored
91
node_modules/balanced-match/README.md
generated
vendored
@ -1,91 +0,0 @@
|
||||
# balanced-match
|
||||
|
||||
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
||||
|
||||
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
|
||||
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
|
||||
|
||||
[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
|
||||
|
||||
## Example
|
||||
|
||||
Get the first matching pair of braces:
|
||||
|
||||
```js
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
||||
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
||||
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
|
||||
```
|
||||
|
||||
The matches are:
|
||||
|
||||
```bash
|
||||
$ node example.js
|
||||
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
||||
{ start: 3,
|
||||
end: 9,
|
||||
pre: 'pre',
|
||||
body: 'first',
|
||||
post: 'between{second}post' }
|
||||
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### var m = balanced(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
object with those keys:
|
||||
|
||||
* **start** the index of the first match of `a`
|
||||
* **end** the index of the matching `b`
|
||||
* **pre** the preamble, `a` and `b` not included
|
||||
* **body** the match, `a` and `b` not included
|
||||
* **post** the postscript, `a` and `b` not included
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
||||
|
||||
### var r = balanced.range(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
array with indexes: `[ <a index>, <b index> ]`.
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install balanced-match
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
58
node_modules/balanced-match/index.js
generated
vendored
58
node_modules/balanced-match/index.js
generated
vendored
@ -1,58 +0,0 @@
|
||||
module.exports = balanced;
|
||||
function balanced(a, b, str) {
|
||||
if (a instanceof RegExp) a = maybeMatch(a, str);
|
||||
if (b instanceof RegExp) b = maybeMatch(b, str);
|
||||
|
||||
var r = range(a, b, str);
|
||||
|
||||
return r && {
|
||||
start: r[0],
|
||||
end: r[1],
|
||||
pre: str.slice(0, r[0]),
|
||||
body: str.slice(r[0] + a.length, r[1]),
|
||||
post: str.slice(r[1] + b.length)
|
||||
};
|
||||
}
|
||||
|
||||
function maybeMatch(reg, str) {
|
||||
var m = str.match(reg);
|
||||
return m ? m[0] : null;
|
||||
}
|
||||
|
||||
balanced.range = range;
|
||||
function range(a, b, str) {
|
||||
var begs, beg, left, right, result;
|
||||
var ai = str.indexOf(a);
|
||||
var bi = str.indexOf(b, ai + 1);
|
||||
var i = ai;
|
||||
|
||||
if (ai >= 0 && bi > 0) {
|
||||
begs = [];
|
||||
left = str.length;
|
||||
|
||||
while (i >= 0 && !result) {
|
||||
if (i == ai) {
|
||||
begs.push(i);
|
||||
ai = str.indexOf(a, i + 1);
|
||||
} else if (begs.length == 1) {
|
||||
result = [ begs.pop(), bi ];
|
||||
} else {
|
||||
beg = begs.pop();
|
||||
if (beg < left) {
|
||||
left = beg;
|
||||
right = bi;
|
||||
}
|
||||
|
||||
bi = str.indexOf(b, i + 1);
|
||||
}
|
||||
|
||||
i = ai < bi && ai >= 0 ? ai : bi;
|
||||
}
|
||||
|
||||
if (begs.length) {
|
||||
result = [ left, right ];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
110
node_modules/balanced-match/package.json
generated
vendored
110
node_modules/balanced-match/package.json
generated
vendored
@ -1,110 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "balanced-match@^0.4.1",
|
||||
"scope": null,
|
||||
"escapedName": "balanced-match",
|
||||
"name": "balanced-match",
|
||||
"rawSpec": "^0.4.1",
|
||||
"spec": ">=0.4.1 <0.5.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\brace-expansion"
|
||||
]
|
||||
],
|
||||
"_from": "balanced-match@>=0.4.1 <0.5.0",
|
||||
"_id": "balanced-match@0.4.2",
|
||||
"_inCache": true,
|
||||
"_location": "/balanced-match",
|
||||
"_nodeVersion": "4.4.7",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
},
|
||||
"_npmVersion": "2.15.8",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "balanced-match@^0.4.1",
|
||||
"scope": null,
|
||||
"escapedName": "balanced-match",
|
||||
"name": "balanced-match",
|
||||
"rawSpec": "^0.4.1",
|
||||
"spec": ">=0.4.1 <0.5.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/brace-expansion"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
|
||||
"_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "balanced-match@^0.4.1",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\brace-expansion",
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/juliangruber/balanced-match/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
||||
"devDependencies": {
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
|
||||
"tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz"
|
||||
},
|
||||
"gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2",
|
||||
"homepage": "https://github.com/juliangruber/balanced-match",
|
||||
"keywords": [
|
||||
"match",
|
||||
"regexp",
|
||||
"test",
|
||||
"balanced",
|
||||
"parse"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
}
|
||||
],
|
||||
"name": "balanced-match",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/balanced-match.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"version": "0.4.2"
|
||||
}
|
60
node_modules/beeper/index.js
generated
vendored
60
node_modules/beeper/index.js
generated
vendored
@ -1,60 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var BEEP_DELAY = 500;
|
||||
|
||||
function beep() {
|
||||
process.stdout.write('\u0007');
|
||||
}
|
||||
|
||||
function melodicalBeep(val, cb) {
|
||||
if (val.length === 0) {
|
||||
cb();
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
if (val.shift() === '*') {
|
||||
beep();
|
||||
}
|
||||
|
||||
melodicalBeep(val, cb);
|
||||
}, BEEP_DELAY);
|
||||
}
|
||||
|
||||
module.exports = function (val, cb) {
|
||||
if (!process.stdout.isTTY ||
|
||||
process.argv.indexOf('--no-beep') !== -1 ||
|
||||
process.argv.indexOf('--beep=false') !== -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
cb = cb || function () {};
|
||||
|
||||
if (val === parseInt(val)) {
|
||||
if (val < 0) {
|
||||
throw new TypeError('Negative numbers are not accepted');
|
||||
}
|
||||
|
||||
if (val === 0) {
|
||||
cb();
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < val; i++) {
|
||||
setTimeout(function (i) {
|
||||
beep();
|
||||
|
||||
if (i === val - 1) {
|
||||
cb();
|
||||
}
|
||||
}, BEEP_DELAY * i, i);
|
||||
}
|
||||
} else if (!val) {
|
||||
beep();
|
||||
cb();
|
||||
} else if (typeof val === 'string') {
|
||||
melodicalBeep(val.split(''), cb);
|
||||
} else {
|
||||
throw new TypeError('Not an accepted type');
|
||||
}
|
||||
};
|
21
node_modules/beeper/license
generated
vendored
21
node_modules/beeper/license
generated
vendored
@ -1,21 +0,0 @@
|
||||
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.
|
106
node_modules/beeper/package.json
generated
vendored
106
node_modules/beeper/package.json
generated
vendored
@ -1,106 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "beeper@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "beeper",
|
||||
"name": "beeper",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\gulp-util"
|
||||
]
|
||||
],
|
||||
"_from": "beeper@>=1.0.0 <2.0.0",
|
||||
"_id": "beeper@1.1.1",
|
||||
"_inCache": true,
|
||||
"_location": "/beeper",
|
||||
"_nodeVersion": "6.9.1",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/beeper-1.1.1.tgz_1478779325954_0.4620432916563004"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.10.8",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "beeper@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "beeper",
|
||||
"name": "beeper",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
|
||||
"_shasum": "e6d5ea8c5dad001304a70b22638447f69cb2f809",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "beeper@^1.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\gulp-util",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/beeper/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Make your terminal beep",
|
||||
"devDependencies": {
|
||||
"hooker": "^0.2.3",
|
||||
"tape": "^4.0.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "e6d5ea8c5dad001304a70b22638447f69cb2f809",
|
||||
"tarball": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "34f2c73a340f000c9e060f7038362db6782b236e",
|
||||
"homepage": "https://github.com/sindresorhus/beeper#readme",
|
||||
"keywords": [
|
||||
"beep",
|
||||
"beeper",
|
||||
"boop",
|
||||
"terminal",
|
||||
"term",
|
||||
"cli",
|
||||
"console",
|
||||
"ding",
|
||||
"ping",
|
||||
"alert",
|
||||
"gulpfriendly"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "beeper",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/beeper.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.1.1"
|
||||
}
|
55
node_modules/beeper/readme.md
generated
vendored
55
node_modules/beeper/readme.md
generated
vendored
@ -1,55 +0,0 @@
|
||||
# beeper [![Build Status](https://travis-ci.org/sindresorhus/beeper.svg?branch=master)](https://travis-ci.org/sindresorhus/beeper)
|
||||
|
||||
> Make your terminal beep
|
||||
|
||||
![](https://cloud.githubusercontent.com/assets/170270/5261236/f8471100-7a49-11e4-81af-96cd09a522d9.gif)
|
||||
|
||||
Useful as an attention grabber e.g. when an error happens.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save beeper
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var beeper = require('beeper');
|
||||
|
||||
beeper();
|
||||
// beep one time
|
||||
|
||||
beeper(3);
|
||||
// beep three times
|
||||
|
||||
beeper('****-*-*');
|
||||
// beep, beep, beep, beep, pause, beep, pause, beep
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
It will not beep if stdout is not TTY or if the user supplies the `--no-beep` flag.
|
||||
|
||||
### beeper([count|melody], [callback])
|
||||
|
||||
#### count
|
||||
|
||||
Type: `number`
|
||||
Default: `1`
|
||||
|
||||
How many times you want it to beep.
|
||||
|
||||
#### melody
|
||||
|
||||
Type: `string`
|
||||
|
||||
Construct your own melody by supplying a string of `*` for beep `-` for pause.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
122
node_modules/brace-expansion/README.md
generated
vendored
122
node_modules/brace-expansion/README.md
generated
vendored
@ -1,122 +0,0 @@
|
||||
# brace-expansion
|
||||
|
||||
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
||||
as known from sh/bash, in JavaScript.
|
||||
|
||||
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
|
||||
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
|
||||
|
||||
[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
|
||||
expand('file-{a,b,c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('-v{,,}')
|
||||
// => ['-v', '-v', '-v']
|
||||
|
||||
expand('file{0..2}.jpg')
|
||||
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
||||
|
||||
expand('file-{a..c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('file{2..0}.jpg')
|
||||
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
||||
|
||||
expand('file{0..4..2}.jpg')
|
||||
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
||||
|
||||
expand('file-{a..e..2}.jpg')
|
||||
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
||||
|
||||
expand('file{00..10..5}.jpg')
|
||||
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
||||
|
||||
expand('{{A..C},{a..c}}')
|
||||
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
||||
|
||||
expand('ppp{,config,oe{,conf}}')
|
||||
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
```
|
||||
|
||||
### var expanded = expand(str)
|
||||
|
||||
Return an array of all possible and valid expansions of `str`. If none are
|
||||
found, `[str]` is returned.
|
||||
|
||||
Valid expansions are:
|
||||
|
||||
```js
|
||||
/^(.*,)+(.+)?$/
|
||||
// {a,b,...}
|
||||
```
|
||||
|
||||
A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
||||
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
||||
to have equal length. Negative numbers and backwards iteration work too.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
||||
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
||||
number.
|
||||
|
||||
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install brace-expansion
|
||||
```
|
||||
|
||||
## Contributors
|
||||
|
||||
- [Julian Gruber](https://github.com/juliangruber)
|
||||
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
201
node_modules/brace-expansion/index.js
generated
vendored
201
node_modules/brace-expansion/index.js
generated
vendored
@ -1,201 +0,0 @@
|
||||
var concatMap = require('concat-map');
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
module.exports = expandTop;
|
||||
|
||||
var escSlash = '\0SLASH'+Math.random()+'\0';
|
||||
var escOpen = '\0OPEN'+Math.random()+'\0';
|
||||
var escClose = '\0CLOSE'+Math.random()+'\0';
|
||||
var escComma = '\0COMMA'+Math.random()+'\0';
|
||||
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
||||
|
||||
function numeric(str) {
|
||||
return parseInt(str, 10) == str
|
||||
? parseInt(str, 10)
|
||||
: str.charCodeAt(0);
|
||||
}
|
||||
|
||||
function escapeBraces(str) {
|
||||
return str.split('\\\\').join(escSlash)
|
||||
.split('\\{').join(escOpen)
|
||||
.split('\\}').join(escClose)
|
||||
.split('\\,').join(escComma)
|
||||
.split('\\.').join(escPeriod);
|
||||
}
|
||||
|
||||
function unescapeBraces(str) {
|
||||
return str.split(escSlash).join('\\')
|
||||
.split(escOpen).join('{')
|
||||
.split(escClose).join('}')
|
||||
.split(escComma).join(',')
|
||||
.split(escPeriod).join('.');
|
||||
}
|
||||
|
||||
|
||||
// Basically just str.split(","), but handling cases
|
||||
// where we have nested braced sections, which should be
|
||||
// treated as individual members, like {a,{b,c},d}
|
||||
function parseCommaParts(str) {
|
||||
if (!str)
|
||||
return [''];
|
||||
|
||||
var parts = [];
|
||||
var m = balanced('{', '}', str);
|
||||
|
||||
if (!m)
|
||||
return str.split(',');
|
||||
|
||||
var pre = m.pre;
|
||||
var body = m.body;
|
||||
var post = m.post;
|
||||
var p = pre.split(',');
|
||||
|
||||
p[p.length-1] += '{' + body + '}';
|
||||
var postParts = parseCommaParts(post);
|
||||
if (post.length) {
|
||||
p[p.length-1] += postParts.shift();
|
||||
p.push.apply(p, postParts);
|
||||
}
|
||||
|
||||
parts.push.apply(parts, p);
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
function expandTop(str) {
|
||||
if (!str)
|
||||
return [];
|
||||
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.substr(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.substr(2);
|
||||
}
|
||||
|
||||
return expand(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
|
||||
function identity(e) {
|
||||
return e;
|
||||
}
|
||||
|
||||
function embrace(str) {
|
||||
return '{' + str + '}';
|
||||
}
|
||||
function isPadded(el) {
|
||||
return /^-?0\d/.test(el);
|
||||
}
|
||||
|
||||
function lte(i, y) {
|
||||
return i <= y;
|
||||
}
|
||||
function gte(i, y) {
|
||||
return i >= y;
|
||||
}
|
||||
|
||||
function expand(str, isTop) {
|
||||
var expansions = [];
|
||||
|
||||
var m = balanced('{', '}', str);
|
||||
if (!m || /\$$/.test(m.pre)) return [str];
|
||||
|
||||
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isSequence = isNumericSequence || isAlphaSequence;
|
||||
var isOptions = /^(.*,)+(.+)?$/.test(m.body);
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,.*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand(str);
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
|
||||
var n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
} else {
|
||||
n = parseCommaParts(m.body);
|
||||
if (n.length === 1) {
|
||||
// x{{a,b}}y ==> x{a}y x{b}y
|
||||
n = expand(n[0], false).map(embrace);
|
||||
if (n.length === 1) {
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
return post.map(function(p) {
|
||||
return m.pre + n[0] + p;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// at this point, n is the parts, and we know it's not a comma set
|
||||
// with a single entry.
|
||||
|
||||
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
var pre = m.pre;
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
|
||||
var N;
|
||||
|
||||
if (isSequence) {
|
||||
var x = numeric(n[0]);
|
||||
var y = numeric(n[1]);
|
||||
var width = Math.max(n[0].length, n[1].length)
|
||||
var incr = n.length == 3
|
||||
? Math.abs(numeric(n[2]))
|
||||
: 1;
|
||||
var test = lte;
|
||||
var reverse = y < x;
|
||||
if (reverse) {
|
||||
incr *= -1;
|
||||
test = gte;
|
||||
}
|
||||
var pad = n.some(isPadded);
|
||||
|
||||
N = [];
|
||||
|
||||
for (var i = x; test(i, y); i += incr) {
|
||||
var c;
|
||||
if (isAlphaSequence) {
|
||||
c = String.fromCharCode(i);
|
||||
if (c === '\\')
|
||||
c = '';
|
||||
} else {
|
||||
c = String(i);
|
||||
if (pad) {
|
||||
var need = width - c.length;
|
||||
if (need > 0) {
|
||||
var z = new Array(need + 1).join('0');
|
||||
if (i < 0)
|
||||
c = '-' + z + c.slice(1);
|
||||
else
|
||||
c = z + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
N.push(c);
|
||||
}
|
||||
} else {
|
||||
N = concatMap(n, function(el) { return expand(el, false) });
|
||||
}
|
||||
|
||||
for (var j = 0; j < N.length; j++) {
|
||||
for (var k = 0; k < post.length; k++) {
|
||||
var expansion = pre + N[j] + post[k];
|
||||
if (!isTop || isSequence || expansion)
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
|
||||
return expansions;
|
||||
}
|
||||
|
113
node_modules/brace-expansion/package.json
generated
vendored
113
node_modules/brace-expansion/package.json
generated
vendored
@ -1,113 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "brace-expansion@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "brace-expansion",
|
||||
"name": "brace-expansion",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\minimatch"
|
||||
]
|
||||
],
|
||||
"_from": "brace-expansion@>=1.0.0 <2.0.0",
|
||||
"_id": "brace-expansion@1.1.6",
|
||||
"_inCache": true,
|
||||
"_location": "/brace-expansion",
|
||||
"_nodeVersion": "4.4.7",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
},
|
||||
"_npmVersion": "2.15.8",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "brace-expansion@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "brace-expansion",
|
||||
"name": "brace-expansion",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/glob-stream/minimatch",
|
||||
"/minimatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz",
|
||||
"_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "brace-expansion@^1.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\minimatch",
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/juliangruber/brace-expansion/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"balanced-match": "^0.4.1",
|
||||
"concat-map": "0.0.1"
|
||||
},
|
||||
"description": "Brace expansion as known from sh/bash",
|
||||
"devDependencies": {
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
|
||||
"tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz"
|
||||
},
|
||||
"gitHead": "791262fa06625e9c5594cde529a21d82086af5f2",
|
||||
"homepage": "https://github.com/juliangruber/brace-expansion",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
},
|
||||
{
|
||||
"name": "isaacs",
|
||||
"email": "isaacs@npmjs.com"
|
||||
}
|
||||
],
|
||||
"name": "brace-expansion",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/brace-expansion.git"
|
||||
},
|
||||
"scripts": {
|
||||
"gentest": "bash test/generate.sh",
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"version": "1.1.6"
|
||||
}
|
21
node_modules/braces/LICENSE
generated
vendored
21
node_modules/braces/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
|
||||
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.
|
248
node_modules/braces/README.md
generated
vendored
248
node_modules/braces/README.md
generated
vendored
@ -1,248 +0,0 @@
|
||||
# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Build Status](https://img.shields.io/travis/jonschlinkert/braces.svg?style=flat)](https://travis-ci.org/jonschlinkert/braces)
|
||||
|
||||
Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install braces --save
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
* Complete support for the braces part of the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/). Braces passes [all of the relevant unit tests](#bash-4-3-support) from the spec.
|
||||
* Expands comma-separated values: `a/{b,c}/d` => `['a/b/d', 'a/c/d']`
|
||||
* Expands alphabetical or numerical ranges: `{1..3}` => `['1', '2', '3']`
|
||||
* [Very fast](#benchmarks)
|
||||
* [Special characters](./patterns.md) can be used to generate interesting patterns.
|
||||
|
||||
## Example usage
|
||||
|
||||
```js
|
||||
var braces = require('braces');
|
||||
|
||||
braces('a/{x,y}/c{d}e')
|
||||
//=> ['a/x/cde', 'a/y/cde']
|
||||
|
||||
braces('a/b/c/{x,y}')
|
||||
//=> ['a/b/c/x', 'a/b/c/y']
|
||||
|
||||
braces('a/{x,{1..5},y}/c{d}e')
|
||||
//=> ['a/x/cde', 'a/1/cde', 'a/y/cde', 'a/2/cde', 'a/3/cde', 'a/4/cde', 'a/5/cde']
|
||||
```
|
||||
|
||||
### Use case: fixtures
|
||||
|
||||
> Use braces to generate test fixtures!
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
var braces = require('./');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
braces('blah/{a..z}.js').forEach(function(fp) {
|
||||
if (!fs.existsSync(path.dirname(fp))) {
|
||||
fs.mkdirSync(path.dirname(fp));
|
||||
}
|
||||
fs.writeFileSync(fp, '');
|
||||
});
|
||||
```
|
||||
|
||||
See the [tests](./test/test.js) for more examples and use cases (also see the [bash spec tests](./test/bash-mm-adjusted.js));
|
||||
|
||||
### Range expansion
|
||||
|
||||
Uses [expand-range](https://github.com/jonschlinkert/expand-range) for range expansion.
|
||||
|
||||
```js
|
||||
braces('a{1..3}b')
|
||||
//=> ['a1b', 'a2b', 'a3b']
|
||||
|
||||
braces('a{5..8}b')
|
||||
//=> ['a5b', 'a6b', 'a7b', 'a8b']
|
||||
|
||||
braces('a{00..05}b')
|
||||
//=> ['a00b', 'a01b', 'a02b', 'a03b', 'a04b', 'a05b']
|
||||
|
||||
braces('a{01..03}b')
|
||||
//=> ['a01b', 'a02b', 'a03b']
|
||||
|
||||
braces('a{000..005}b')
|
||||
//=> ['a000b', 'a001b', 'a002b', 'a003b', 'a004b', 'a005b']
|
||||
|
||||
braces('a{a..e}b')
|
||||
//=> ['aab', 'abb', 'acb', 'adb', 'aeb']
|
||||
|
||||
braces('a{A..E}b')
|
||||
//=> ['aAb', 'aBb', 'aCb', 'aDb', 'aEb']
|
||||
```
|
||||
|
||||
Pass a function as the last argument to customize range expansions:
|
||||
|
||||
```js
|
||||
var range = braces('x{a..e}y', function (str, i) {
|
||||
return String.fromCharCode(str) + i;
|
||||
});
|
||||
|
||||
console.log(range);
|
||||
//=> ['xa0y', 'xb1y', 'xc2y', 'xd3y', 'xe4y']
|
||||
```
|
||||
|
||||
See [expand-range](https://github.com/jonschlinkert/expand-range) for benchmarks, tests and the full list of range expansion features.
|
||||
|
||||
## Options
|
||||
|
||||
### options.makeRe
|
||||
|
||||
Type: `Boolean`
|
||||
|
||||
Deafault: `false`
|
||||
|
||||
Return a regex-optimal string. If you're using braces to generate regex, this will result in dramatically faster performance.
|
||||
|
||||
**Examples**
|
||||
|
||||
With the default settings (`{makeRe: false}`):
|
||||
|
||||
```js
|
||||
braces('{1..5}');
|
||||
//=> ['1', '2', '3', '4', '5']
|
||||
```
|
||||
|
||||
With `{makeRe: true}`:
|
||||
|
||||
```js
|
||||
braces('{1..5}', {makeRe: true});
|
||||
//=> ['[1-5]']
|
||||
|
||||
braces('{3..9..3}', {makeRe: true});
|
||||
//=> ['(3|6|9)']
|
||||
```
|
||||
|
||||
### options.bash
|
||||
|
||||
Type: `Boolean`
|
||||
|
||||
Default: `false`
|
||||
|
||||
Enables complete support for the Bash specification. The downside is a 20-25% speed decrease.
|
||||
|
||||
**Example**
|
||||
|
||||
Using the default setting (`{bash: false}`):
|
||||
|
||||
```js
|
||||
braces('a{b}c');
|
||||
//=> ['abc']
|
||||
```
|
||||
|
||||
In bash (and minimatch), braces with one item are not expanded. To get the same result with braces, set `{bash: true}`:
|
||||
|
||||
```js
|
||||
braces('a{b}c', {bash: true});
|
||||
//=> ['a{b}c']
|
||||
```
|
||||
|
||||
### options.nodupes
|
||||
|
||||
Type: `Boolean`
|
||||
|
||||
Deafault: `true`
|
||||
|
||||
Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options
|
||||
|
||||
## Bash 4.3 Support
|
||||
|
||||
> Better support for Bash 4.3 than minimatch
|
||||
|
||||
This project has comprehensive unit tests, including tests coverted from [Bash 4.3](www.gnu.org/software/bash/). Currently only 8 of 102 unit tests fail, and
|
||||
|
||||
## Run benchmarks
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```bash
|
||||
npm i -d && npm benchmark
|
||||
```
|
||||
|
||||
### Latest results
|
||||
|
||||
```bash
|
||||
#1: escape.js
|
||||
brace-expansion.js x 114,934 ops/sec ±1.24% (93 runs sampled)
|
||||
braces.js x 342,254 ops/sec ±0.84% (90 runs sampled)
|
||||
|
||||
#2: exponent.js
|
||||
brace-expansion.js x 12,359 ops/sec ±0.86% (96 runs sampled)
|
||||
braces.js x 20,389 ops/sec ±0.71% (97 runs sampled)
|
||||
|
||||
#3: multiple.js
|
||||
brace-expansion.js x 114,469 ops/sec ±1.44% (94 runs sampled)
|
||||
braces.js x 401,621 ops/sec ±0.87% (91 runs sampled)
|
||||
|
||||
#4: nested.js
|
||||
brace-expansion.js x 102,769 ops/sec ±1.55% (92 runs sampled)
|
||||
braces.js x 314,088 ops/sec ±0.71% (98 runs sampled)
|
||||
|
||||
#5: normal.js
|
||||
brace-expansion.js x 157,577 ops/sec ±1.65% (91 runs sampled)
|
||||
braces.js x 1,115,950 ops/sec ±0.74% (94 runs sampled)
|
||||
|
||||
#6: range.js
|
||||
brace-expansion.js x 138,822 ops/sec ±1.71% (91 runs sampled)
|
||||
braces.js x 1,108,353 ops/sec ±0.85% (94 runs sampled)
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://www.npmjs.com/package/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range)
|
||||
* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range)
|
||||
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch)
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/braces/issues/new).
|
||||
|
||||
## Building docs
|
||||
|
||||
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
|
||||
|
||||
```sh
|
||||
$ npm install verb && npm run docs
|
||||
```
|
||||
|
||||
Or, if [verb](https://github.com/verbose/verb) is installed globally:
|
||||
|
||||
```sh
|
||||
$ verb
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm install -d && npm test
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT license](https://github.com/jonschlinkert/braces/blob/master/LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 21, 2016._
|
399
node_modules/braces/index.js
generated
vendored
399
node_modules/braces/index.js
generated
vendored
@ -1,399 +0,0 @@
|
||||
/*!
|
||||
* braces <https://github.com/jonschlinkert/braces>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
|
||||
var expand = require('expand-range');
|
||||
var repeat = require('repeat-element');
|
||||
var tokens = require('preserve');
|
||||
|
||||
/**
|
||||
* Expose `braces`
|
||||
*/
|
||||
|
||||
module.exports = function(str, options) {
|
||||
if (typeof str !== 'string') {
|
||||
throw new Error('braces expects a string');
|
||||
}
|
||||
return braces(str, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Expand `{foo,bar}` or `{1..5}` braces in the
|
||||
* given `string`.
|
||||
*
|
||||
* @param {String} `str`
|
||||
* @param {Array} `arr`
|
||||
* @param {Object} `options`
|
||||
* @return {Array}
|
||||
*/
|
||||
|
||||
function braces(str, arr, options) {
|
||||
if (str === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!Array.isArray(arr)) {
|
||||
options = arr;
|
||||
arr = [];
|
||||
}
|
||||
|
||||
var opts = options || {};
|
||||
arr = arr || [];
|
||||
|
||||
if (typeof opts.nodupes === 'undefined') {
|
||||
opts.nodupes = true;
|
||||
}
|
||||
|
||||
var fn = opts.fn;
|
||||
var es6;
|
||||
|
||||
if (typeof opts === 'function') {
|
||||
fn = opts;
|
||||
opts = {};
|
||||
}
|
||||
|
||||
if (!(patternRe instanceof RegExp)) {
|
||||
patternRe = patternRegex();
|
||||
}
|
||||
|
||||
var matches = str.match(patternRe) || [];
|
||||
var m = matches[0];
|
||||
|
||||
switch(m) {
|
||||
case '\\,':
|
||||
return escapeCommas(str, arr, opts);
|
||||
case '\\.':
|
||||
return escapeDots(str, arr, opts);
|
||||
case '\/.':
|
||||
return escapePaths(str, arr, opts);
|
||||
case ' ':
|
||||
return splitWhitespace(str);
|
||||
case '{,}':
|
||||
return exponential(str, opts, braces);
|
||||
case '{}':
|
||||
return emptyBraces(str, arr, opts);
|
||||
case '\\{':
|
||||
case '\\}':
|
||||
return escapeBraces(str, arr, opts);
|
||||
case '${':
|
||||
if (!/\{[^{]+\{/.test(str)) {
|
||||
return arr.concat(str);
|
||||
} else {
|
||||
es6 = true;
|
||||
str = tokens.before(str, es6Regex());
|
||||
}
|
||||
}
|
||||
|
||||
if (!(braceRe instanceof RegExp)) {
|
||||
braceRe = braceRegex();
|
||||
}
|
||||
|
||||
var match = braceRe.exec(str);
|
||||
if (match == null) {
|
||||
return [str];
|
||||
}
|
||||
|
||||
var outter = match[1];
|
||||
var inner = match[2];
|
||||
if (inner === '') { return [str]; }
|
||||
|
||||
var segs, segsLength;
|
||||
|
||||
if (inner.indexOf('..') !== -1) {
|
||||
segs = expand(inner, opts, fn) || inner.split(',');
|
||||
segsLength = segs.length;
|
||||
|
||||
} else if (inner[0] === '"' || inner[0] === '\'') {
|
||||
return arr.concat(str.split(/['"]/).join(''));
|
||||
|
||||
} else {
|
||||
segs = inner.split(',');
|
||||
if (opts.makeRe) {
|
||||
return braces(str.replace(outter, wrap(segs, '|')), opts);
|
||||
}
|
||||
|
||||
segsLength = segs.length;
|
||||
if (segsLength === 1 && opts.bash) {
|
||||
segs[0] = wrap(segs[0], '\\');
|
||||
}
|
||||
}
|
||||
|
||||
var len = segs.length;
|
||||
var i = 0, val;
|
||||
|
||||
while (len--) {
|
||||
var path = segs[i++];
|
||||
|
||||
if (/(\.[^.\/])/.test(path)) {
|
||||
if (segsLength > 1) {
|
||||
return segs;
|
||||
} else {
|
||||
return [str];
|
||||
}
|
||||
}
|
||||
|
||||
val = splice(str, outter, path);
|
||||
|
||||
if (/\{[^{}]+?\}/.test(val)) {
|
||||
arr = braces(val, arr, opts);
|
||||
} else if (val !== '') {
|
||||
if (opts.nodupes && arr.indexOf(val) !== -1) { continue; }
|
||||
arr.push(es6 ? tokens.after(val) : val);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.strict) { return filter(arr, filterEmpty); }
|
||||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand exponential ranges
|
||||
*
|
||||
* `a{,}{,}` => ['a', 'a', 'a', 'a']
|
||||
*/
|
||||
|
||||
function exponential(str, options, fn) {
|
||||
if (typeof options === 'function') {
|
||||
fn = options;
|
||||
options = null;
|
||||
}
|
||||
|
||||
var opts = options || {};
|
||||
var esc = '__ESC_EXP__';
|
||||
var exp = 0;
|
||||
var res;
|
||||
|
||||
var parts = str.split('{,}');
|
||||
if (opts.nodupes) {
|
||||
return fn(parts.join(''), opts);
|
||||
}
|
||||
|
||||
exp = parts.length - 1;
|
||||
res = fn(parts.join(esc), opts);
|
||||
var len = res.length;
|
||||
var arr = [];
|
||||
var i = 0;
|
||||
|
||||
while (len--) {
|
||||
var ele = res[i++];
|
||||
var idx = ele.indexOf(esc);
|
||||
|
||||
if (idx === -1) {
|
||||
arr.push(ele);
|
||||
|
||||
} else {
|
||||
ele = ele.split('__ESC_EXP__').join('');
|
||||
if (!!ele && opts.nodupes !== false) {
|
||||
arr.push(ele);
|
||||
|
||||
} else {
|
||||
var num = Math.pow(2, exp);
|
||||
arr.push.apply(arr, repeat(ele, num));
|
||||
}
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap a value with parens, brackets or braces,
|
||||
* based on the given character/separator.
|
||||
*
|
||||
* @param {String|Array} `val`
|
||||
* @param {String} `ch`
|
||||
* @return {String}
|
||||
*/
|
||||
|
||||
function wrap(val, ch) {
|
||||
if (ch === '|') {
|
||||
return '(' + val.join(ch) + ')';
|
||||
}
|
||||
if (ch === ',') {
|
||||
return '{' + val.join(ch) + '}';
|
||||
}
|
||||
if (ch === '-') {
|
||||
return '[' + val.join(ch) + ']';
|
||||
}
|
||||
if (ch === '\\') {
|
||||
return '\\{' + val + '\\}';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle empty braces: `{}`
|
||||
*/
|
||||
|
||||
function emptyBraces(str, arr, opts) {
|
||||
return braces(str.split('{}').join('\\{\\}'), arr, opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter out empty-ish values
|
||||
*/
|
||||
|
||||
function filterEmpty(ele) {
|
||||
return !!ele && ele !== '\\';
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle patterns with whitespace
|
||||
*/
|
||||
|
||||
function splitWhitespace(str) {
|
||||
var segs = str.split(' ');
|
||||
var len = segs.length;
|
||||
var res = [];
|
||||
var i = 0;
|
||||
|
||||
while (len--) {
|
||||
res.push.apply(res, braces(segs[i++]));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle escaped braces: `\\{foo,bar}`
|
||||
*/
|
||||
|
||||
function escapeBraces(str, arr, opts) {
|
||||
if (!/\{[^{]+\{/.test(str)) {
|
||||
return arr.concat(str.split('\\').join(''));
|
||||
} else {
|
||||
str = str.split('\\{').join('__LT_BRACE__');
|
||||
str = str.split('\\}').join('__RT_BRACE__');
|
||||
return map(braces(str, arr, opts), function(ele) {
|
||||
ele = ele.split('__LT_BRACE__').join('{');
|
||||
return ele.split('__RT_BRACE__').join('}');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle escaped dots: `{1\\.2}`
|
||||
*/
|
||||
|
||||
function escapeDots(str, arr, opts) {
|
||||
if (!/[^\\]\..+\\\./.test(str)) {
|
||||
return arr.concat(str.split('\\').join(''));
|
||||
} else {
|
||||
str = str.split('\\.').join('__ESC_DOT__');
|
||||
return map(braces(str, arr, opts), function(ele) {
|
||||
return ele.split('__ESC_DOT__').join('.');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle escaped dots: `{1\\.2}`
|
||||
*/
|
||||
|
||||
function escapePaths(str, arr, opts) {
|
||||
str = str.split('\/.').join('__ESC_PATH__');
|
||||
return map(braces(str, arr, opts), function(ele) {
|
||||
return ele.split('__ESC_PATH__').join('\/.');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle escaped commas: `{a\\,b}`
|
||||
*/
|
||||
|
||||
function escapeCommas(str, arr, opts) {
|
||||
if (!/\w,/.test(str)) {
|
||||
return arr.concat(str.split('\\').join(''));
|
||||
} else {
|
||||
str = str.split('\\,').join('__ESC_COMMA__');
|
||||
return map(braces(str, arr, opts), function(ele) {
|
||||
return ele.split('__ESC_COMMA__').join(',');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Regex for common patterns
|
||||
*/
|
||||
|
||||
function patternRegex() {
|
||||
return /\${|( (?=[{,}])|(?=[{,}]) )|{}|{,}|\\,(?=.*[{}])|\/\.(?=.*[{}])|\\\.(?={)|\\{|\\}/;
|
||||
}
|
||||
|
||||
/**
|
||||
* Braces regex.
|
||||
*/
|
||||
|
||||
function braceRegex() {
|
||||
return /.*(\\?\{([^}]+)\})/;
|
||||
}
|
||||
|
||||
/**
|
||||
* es6 delimiter regex.
|
||||
*/
|
||||
|
||||
function es6Regex() {
|
||||
return /\$\{([^}]+)\}/;
|
||||
}
|
||||
|
||||
var braceRe;
|
||||
var patternRe;
|
||||
|
||||
/**
|
||||
* Faster alternative to `String.replace()` when the
|
||||
* index of the token to be replaces can't be supplied
|
||||
*/
|
||||
|
||||
function splice(str, token, replacement) {
|
||||
var i = str.indexOf(token);
|
||||
return str.substr(0, i) + replacement
|
||||
+ str.substr(i + token.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fast array map
|
||||
*/
|
||||
|
||||
function map(arr, fn) {
|
||||
if (arr == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
var len = arr.length;
|
||||
var res = new Array(len);
|
||||
var i = -1;
|
||||
|
||||
while (++i < len) {
|
||||
res[i] = fn(arr[i], i, arr);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fast array filter
|
||||
*/
|
||||
|
||||
function filter(arr, cb) {
|
||||
if (arr == null) return [];
|
||||
if (typeof cb !== 'function') {
|
||||
throw new TypeError('braces: filter expects a callback function.');
|
||||
}
|
||||
|
||||
var len = arr.length;
|
||||
var res = arr.slice();
|
||||
var i = 0;
|
||||
|
||||
while (len--) {
|
||||
if (!cb(arr[len], i++)) {
|
||||
res.splice(len, 1);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
157
node_modules/braces/package.json
generated
vendored
157
node_modules/braces/package.json
generated
vendored
@ -1,157 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "braces@^1.8.2",
|
||||
"scope": null,
|
||||
"escapedName": "braces",
|
||||
"name": "braces",
|
||||
"rawSpec": "^1.8.2",
|
||||
"spec": ">=1.8.2 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\micromatch"
|
||||
]
|
||||
],
|
||||
"_from": "braces@>=1.8.2 <2.0.0",
|
||||
"_id": "braces@1.8.5",
|
||||
"_inCache": true,
|
||||
"_location": "/braces",
|
||||
"_nodeVersion": "5.5.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/braces-1.8.5.tgz_1463843581552_0.5618140168953687"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
"_npmVersion": "3.6.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "braces@^1.8.2",
|
||||
"scope": null,
|
||||
"escapedName": "braces",
|
||||
"name": "braces",
|
||||
"rawSpec": "^1.8.2",
|
||||
"spec": ">=1.8.2 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/micromatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
|
||||
"_shasum": "ba77962e12dff969d6b76711e914b737857bf6a7",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "braces@^1.8.2",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\micromatch",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/braces/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"expand-range": "^1.8.1",
|
||||
"preserve": "^0.2.0",
|
||||
"repeat-element": "^1.1.2"
|
||||
},
|
||||
"description": "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.",
|
||||
"devDependencies": {
|
||||
"benchmarked": "^0.1.5",
|
||||
"brace-expansion": "^1.1.3",
|
||||
"chalk": "^1.1.3",
|
||||
"gulp-format-md": "^0.1.8",
|
||||
"minimatch": "^3.0.0",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^2.4.5",
|
||||
"should": "^8.3.1"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "ba77962e12dff969d6b76711e914b737857bf6a7",
|
||||
"tarball": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "24874614ebeda1c5405180f1f6c9f374bcf384ce",
|
||||
"homepage": "https://github.com/jonschlinkert/braces",
|
||||
"keywords": [
|
||||
"alpha",
|
||||
"alphabetical",
|
||||
"bash",
|
||||
"brace",
|
||||
"expand",
|
||||
"expansion",
|
||||
"filepath",
|
||||
"fill",
|
||||
"fs",
|
||||
"glob",
|
||||
"globbing",
|
||||
"letter",
|
||||
"match",
|
||||
"matches",
|
||||
"matching",
|
||||
"number",
|
||||
"numerical",
|
||||
"path",
|
||||
"range",
|
||||
"ranges",
|
||||
"sh"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
{
|
||||
"name": "es128",
|
||||
"email": "elan.shanker+npm@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "doowb",
|
||||
"email": "brian.woodward@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "braces",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/braces.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"reflinks": [
|
||||
"verb"
|
||||
],
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"micromatch",
|
||||
"expand-range",
|
||||
"fill-range"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "1.8.5"
|
||||
}
|
19
node_modules/buffer-crc32/LICENSE
generated
vendored
19
node_modules/buffer-crc32/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2013 Brian J. Brennan
|
||||
|
||||
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.
|
47
node_modules/buffer-crc32/README.md
generated
vendored
47
node_modules/buffer-crc32/README.md
generated
vendored
@ -1,47 +0,0 @@
|
||||
# buffer-crc32
|
||||
|
||||
[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)
|
||||
|
||||
crc32 that works with binary data and fancy character sets, outputs
|
||||
buffer, signed or unsigned data and has tests.
|
||||
|
||||
Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix
|
||||
|
||||
# install
|
||||
```
|
||||
npm install buffer-crc32
|
||||
```
|
||||
|
||||
# example
|
||||
```js
|
||||
var crc32 = require('buffer-crc32');
|
||||
// works with buffers
|
||||
var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])
|
||||
crc32(buf) // -> <Buffer 94 5a ab 4a>
|
||||
|
||||
// has convenience methods for getting signed or unsigned ints
|
||||
crc32.signed(buf) // -> -1805997238
|
||||
crc32.unsigned(buf) // -> 2488970058
|
||||
|
||||
// will cast to buffer if given a string, so you can
|
||||
// directly use foreign characters safely
|
||||
crc32('自動販売機') // -> <Buffer cb 03 1a c5>
|
||||
|
||||
// and works in append mode too
|
||||
var partialCrc = crc32('hey');
|
||||
var partialCrc = crc32(' ', partialCrc);
|
||||
var partialCrc = crc32('sup', partialCrc);
|
||||
var partialCrc = crc32(' ', partialCrc);
|
||||
var finalCrc = crc32('bros', partialCrc); // -> <Buffer 47 fa 55 70>
|
||||
```
|
||||
|
||||
# tests
|
||||
This was tested against the output of zlib's crc32 method. You can run
|
||||
the tests with`npm test` (requires tap)
|
||||
|
||||
# see also
|
||||
https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also
|
||||
supports buffer inputs and return unsigned ints (thanks @tjholowaychuk).
|
||||
|
||||
# license
|
||||
MIT/X11
|
111
node_modules/buffer-crc32/index.js
generated
vendored
111
node_modules/buffer-crc32/index.js
generated
vendored
@ -1,111 +0,0 @@
|
||||
var Buffer = require('buffer').Buffer;
|
||||
|
||||
var CRC_TABLE = [
|
||||
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
|
||||
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
|
||||
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
|
||||
0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
|
||||
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
|
||||
0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
|
||||
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
|
||||
0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
||||
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
|
||||
0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
|
||||
0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
|
||||
0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
|
||||
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
|
||||
0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
|
||||
0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
|
||||
0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
||||
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
|
||||
0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
|
||||
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
|
||||
0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
|
||||
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
|
||||
0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
|
||||
0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
|
||||
0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
||||
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
|
||||
0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
|
||||
0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
|
||||
0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
|
||||
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
|
||||
0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
|
||||
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
|
||||
0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
||||
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
|
||||
0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
|
||||
0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
|
||||
0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
|
||||
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
|
||||
0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
|
||||
0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
|
||||
0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
||||
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
|
||||
0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
|
||||
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
|
||||
0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
|
||||
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
|
||||
0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
|
||||
0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
|
||||
0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
||||
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
|
||||
0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
|
||||
0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
|
||||
0x2d02ef8d
|
||||
];
|
||||
|
||||
if (typeof Int32Array !== 'undefined') {
|
||||
CRC_TABLE = new Int32Array(CRC_TABLE);
|
||||
}
|
||||
|
||||
function ensureBuffer(input) {
|
||||
if (Buffer.isBuffer(input)) {
|
||||
return input;
|
||||
}
|
||||
|
||||
var hasNewBufferAPI =
|
||||
typeof Buffer.alloc === "function" &&
|
||||
typeof Buffer.from === "function";
|
||||
|
||||
if (typeof input === "number") {
|
||||
return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input);
|
||||
}
|
||||
else if (typeof input === "string") {
|
||||
return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input);
|
||||
}
|
||||
else {
|
||||
throw new Error("input must be buffer, number, or string, received " +
|
||||
typeof input);
|
||||
}
|
||||
}
|
||||
|
||||
function bufferizeInt(num) {
|
||||
var tmp = ensureBuffer(4);
|
||||
tmp.writeInt32BE(num, 0);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
function _crc32(buf, previous) {
|
||||
buf = ensureBuffer(buf);
|
||||
if (Buffer.isBuffer(previous)) {
|
||||
previous = previous.readUInt32BE(0);
|
||||
}
|
||||
var crc = ~~previous ^ -1;
|
||||
for (var n = 0; n < buf.length; n++) {
|
||||
crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8);
|
||||
}
|
||||
return (crc ^ -1);
|
||||
}
|
||||
|
||||
function crc32() {
|
||||
return bufferizeInt(_crc32.apply(null, arguments));
|
||||
}
|
||||
crc32.signed = function () {
|
||||
return _crc32.apply(null, arguments);
|
||||
};
|
||||
crc32.unsigned = function () {
|
||||
return _crc32.apply(null, arguments) >>> 0;
|
||||
};
|
||||
|
||||
module.exports = crc32;
|
103
node_modules/buffer-crc32/package.json
generated
vendored
103
node_modules/buffer-crc32/package.json
generated
vendored
@ -1,103 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "buffer-crc32@~0.2.3",
|
||||
"scope": null,
|
||||
"escapedName": "buffer-crc32",
|
||||
"name": "buffer-crc32",
|
||||
"rawSpec": "~0.2.3",
|
||||
"spec": ">=0.2.3 <0.3.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\yazl"
|
||||
]
|
||||
],
|
||||
"_from": "buffer-crc32@>=0.2.3 <0.3.0",
|
||||
"_id": "buffer-crc32@0.2.13",
|
||||
"_inCache": true,
|
||||
"_location": "/buffer-crc32",
|
||||
"_nodeVersion": "6.9.1",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/buffer-crc32-0.2.13.tgz_1479778107033_0.1442455758806318"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "brianloveswords",
|
||||
"email": "brianloveswords@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.10.8",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "buffer-crc32@~0.2.3",
|
||||
"scope": null,
|
||||
"escapedName": "buffer-crc32",
|
||||
"name": "buffer-crc32",
|
||||
"rawSpec": "~0.2.3",
|
||||
"spec": ">=0.2.3 <0.3.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/yazl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
||||
"_shasum": "0d333e3f00eac50aa1454abd30ef8c2a5d9a7242",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "buffer-crc32@~0.2.3",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\yazl",
|
||||
"author": {
|
||||
"name": "Brian J. Brennan",
|
||||
"email": "brianloveswords@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/brianloveswords/buffer-crc32/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Vladimir Kuznetsov"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "A pure javascript CRC32 algorithm that plays nice with binary data",
|
||||
"devDependencies": {
|
||||
"tap": "~0.2.5"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "0d333e3f00eac50aa1454abd30ef8c2a5d9a7242",
|
||||
"tarball": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "e9b66c7356f4ea6f7c2f89d51160a1ef6117849f",
|
||||
"homepage": "https://github.com/brianloveswords/buffer-crc32",
|
||||
"license": "MIT",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "brianloveswords",
|
||||
"email": "brian@nyhacker.org"
|
||||
}
|
||||
],
|
||||
"name": "buffer-crc32",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/brianloveswords/buffer-crc32.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap tests/*.test.js"
|
||||
},
|
||||
"version": "0.2.13"
|
||||
}
|
108
node_modules/buffer-shims/index.js
generated
vendored
108
node_modules/buffer-shims/index.js
generated
vendored
@ -1,108 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var buffer = require('buffer');
|
||||
var Buffer = buffer.Buffer;
|
||||
var SlowBuffer = buffer.SlowBuffer;
|
||||
var MAX_LEN = buffer.kMaxLength || 2147483647;
|
||||
exports.alloc = function alloc(size, fill, encoding) {
|
||||
if (typeof Buffer.alloc === 'function') {
|
||||
return Buffer.alloc(size, fill, encoding);
|
||||
}
|
||||
if (typeof encoding === 'number') {
|
||||
throw new TypeError('encoding must not be number');
|
||||
}
|
||||
if (typeof size !== 'number') {
|
||||
throw new TypeError('size must be a number');
|
||||
}
|
||||
if (size > MAX_LEN) {
|
||||
throw new RangeError('size is too large');
|
||||
}
|
||||
var enc = encoding;
|
||||
var _fill = fill;
|
||||
if (_fill === undefined) {
|
||||
enc = undefined;
|
||||
_fill = 0;
|
||||
}
|
||||
var buf = new Buffer(size);
|
||||
if (typeof _fill === 'string') {
|
||||
var fillBuf = new Buffer(_fill, enc);
|
||||
var flen = fillBuf.length;
|
||||
var i = -1;
|
||||
while (++i < size) {
|
||||
buf[i] = fillBuf[i % flen];
|
||||
}
|
||||
} else {
|
||||
buf.fill(_fill);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
exports.allocUnsafe = function allocUnsafe(size) {
|
||||
if (typeof Buffer.allocUnsafe === 'function') {
|
||||
return Buffer.allocUnsafe(size);
|
||||
}
|
||||
if (typeof size !== 'number') {
|
||||
throw new TypeError('size must be a number');
|
||||
}
|
||||
if (size > MAX_LEN) {
|
||||
throw new RangeError('size is too large');
|
||||
}
|
||||
return new Buffer(size);
|
||||
}
|
||||
exports.from = function from(value, encodingOrOffset, length) {
|
||||
if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {
|
||||
return Buffer.from(value, encodingOrOffset, length);
|
||||
}
|
||||
if (typeof value === 'number') {
|
||||
throw new TypeError('"value" argument must not be a number');
|
||||
}
|
||||
if (typeof value === 'string') {
|
||||
return new Buffer(value, encodingOrOffset);
|
||||
}
|
||||
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
|
||||
var offset = encodingOrOffset;
|
||||
if (arguments.length === 1) {
|
||||
return new Buffer(value);
|
||||
}
|
||||
if (typeof offset === 'undefined') {
|
||||
offset = 0;
|
||||
}
|
||||
var len = length;
|
||||
if (typeof len === 'undefined') {
|
||||
len = value.byteLength - offset;
|
||||
}
|
||||
if (offset >= value.byteLength) {
|
||||
throw new RangeError('\'offset\' is out of bounds');
|
||||
}
|
||||
if (len > value.byteLength - offset) {
|
||||
throw new RangeError('\'length\' is out of bounds');
|
||||
}
|
||||
return new Buffer(value.slice(offset, offset + len));
|
||||
}
|
||||
if (Buffer.isBuffer(value)) {
|
||||
var out = new Buffer(value.length);
|
||||
value.copy(out, 0, 0, value.length);
|
||||
return out;
|
||||
}
|
||||
if (value) {
|
||||
if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {
|
||||
return new Buffer(value);
|
||||
}
|
||||
if (value.type === 'Buffer' && Array.isArray(value.data)) {
|
||||
return new Buffer(value.data);
|
||||
}
|
||||
}
|
||||
|
||||
throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');
|
||||
}
|
||||
exports.allocUnsafeSlow = function allocUnsafeSlow(size) {
|
||||
if (typeof Buffer.allocUnsafeSlow === 'function') {
|
||||
return Buffer.allocUnsafeSlow(size);
|
||||
}
|
||||
if (typeof size !== 'number') {
|
||||
throw new TypeError('size must be a number');
|
||||
}
|
||||
if (size >= MAX_LEN) {
|
||||
throw new RangeError('size is too large');
|
||||
}
|
||||
return new SlowBuffer(size);
|
||||
}
|
19
node_modules/buffer-shims/license.md
generated
vendored
19
node_modules/buffer-shims/license.md
generated
vendored
@ -1,19 +0,0 @@
|
||||
# Copyright (c) 2016 Calvin Metcalf
|
||||
|
||||
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.**
|
88
node_modules/buffer-shims/package.json
generated
vendored
88
node_modules/buffer-shims/package.json
generated
vendored
@ -1,88 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "buffer-shims@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "buffer-shims",
|
||||
"name": "buffer-shims",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"D:\\web\\layui\\res\\layui\\node_modules\\through2\\node_modules\\readable-stream"
|
||||
]
|
||||
],
|
||||
"_from": "buffer-shims@>=1.0.0 <2.0.0",
|
||||
"_id": "buffer-shims@1.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/buffer-shims",
|
||||
"_nodeVersion": "5.11.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/buffer-shims-1.0.0.tgz_1462560889323_0.8640750856138766"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "cwmma",
|
||||
"email": "calvin.metcalf@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.8.6",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "buffer-shims@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "buffer-shims",
|
||||
"name": "buffer-shims",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/duplexify/readable-stream",
|
||||
"/gulp-minify-css/readable-stream",
|
||||
"/merge-stream/readable-stream",
|
||||
"/through2/readable-stream"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
|
||||
"_shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "buffer-shims@^1.0.0",
|
||||
"_where": "D:\\web\\layui\\res\\layui\\node_modules\\through2\\node_modules\\readable-stream",
|
||||
"bugs": {
|
||||
"url": "https://github.com/calvinmetcalf/buffer-shims/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "some shims for node buffers",
|
||||
"devDependencies": {
|
||||
"tape": "^4.5.1"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
|
||||
"tarball": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "ea89b3857ab5b8203957922a84e9a48cf4c47e0a",
|
||||
"homepage": "https://github.com/calvinmetcalf/buffer-shims#readme",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "cwmma",
|
||||
"email": "calvin.metcalf@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "buffer-shims",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/calvinmetcalf/buffer-shims.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user