--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
56
node_modules/deep-assign/index.js
generated
vendored
Normal file
56
node_modules/deep-assign/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
'use strict';
|
||||
var isObj = require('is-obj');
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
function toObject(val) {
|
||||
if (val === null || val === undefined) {
|
||||
throw new TypeError('Sources cannot be null or undefined');
|
||||
}
|
||||
|
||||
return Object(val);
|
||||
}
|
||||
|
||||
function base(to, from) {
|
||||
if (to === from) {
|
||||
return to;
|
||||
}
|
||||
|
||||
from = Object(from);
|
||||
|
||||
for (var key in from) {
|
||||
if (hasOwnProperty.call(from, key)) {
|
||||
var val = from[key];
|
||||
|
||||
if (Array.isArray(val)) {
|
||||
to[key] = val.slice();
|
||||
} else if (isObj(val)) {
|
||||
to[key] = base(to[key] || {}, val);
|
||||
} else if (val !== undefined) {
|
||||
to[key] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(from);
|
||||
|
||||
for (var i = 0; i < symbols.length; i++) {
|
||||
if (propIsEnumerable.call(from, symbols[i])) {
|
||||
to[symbols[i]] = from[symbols[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return to;
|
||||
}
|
||||
|
||||
module.exports = function deepAssign(target) {
|
||||
target = toObject(target);
|
||||
|
||||
for (var s = 1; s < arguments.length; s++) {
|
||||
base(target, arguments[s]);
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
21
node_modules/deep-assign/license
generated
vendored
Normal file
21
node_modules/deep-assign/license
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
106
node_modules/deep-assign/package.json
generated
vendored
Normal file
106
node_modules/deep-assign/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "deep-assign@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "deep-assign",
|
||||
"name": "deep-assign",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/jose/Documents/GitHub/Mods/node_modules/gulp-chmod"
|
||||
]
|
||||
],
|
||||
"_from": "deep-assign@>=1.0.0 <2.0.0",
|
||||
"_id": "deep-assign@1.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/deep-assign",
|
||||
"_nodeVersion": "4.0.0",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.14.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "deep-assign@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "deep-assign",
|
||||
"name": "deep-assign",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-chmod"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz",
|
||||
"_shasum": "b092743be8427dc621ea0067cdec7e70dd19f37b",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "deep-assign@^1.0.0",
|
||||
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/gulp-chmod",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/deep-assign/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-obj": "^1.0.0"
|
||||
},
|
||||
"description": "Recursive Object.assign()",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "b092743be8427dc621ea0067cdec7e70dd19f37b",
|
||||
"tarball": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "d853e1fa2b71be5e1449d2b44c9fdb4be8918af8",
|
||||
"homepage": "https://github.com/sindresorhus/deep-assign#readme",
|
||||
"keywords": [
|
||||
"object",
|
||||
"obj",
|
||||
"assign",
|
||||
"extend",
|
||||
"properties",
|
||||
"merge",
|
||||
"deep",
|
||||
"recursive"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "deep-assign",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/deep-assign.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"xo": {
|
||||
"ignores": [
|
||||
"test.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
35
node_modules/deep-assign/readme.md
generated
vendored
Normal file
35
node_modules/deep-assign/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# deep-assign [](https://travis-ci.org/sindresorhus/deep-assign)
|
||||
|
||||
> Recursive [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save deep-assign
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var deepAssign = require('deep-assign');
|
||||
|
||||
deepAssign({a: {b: 0}}, {a: {b: 1, c: 2}}, {a: {c: 3}});
|
||||
//=> {a: {b: 1, c: 3}}
|
||||
```
|
||||
|
||||
|
||||
### deepAssign(target, source, [source, ...])
|
||||
|
||||
Recursively assigns own enumerable properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [object-assign](https://github.com/sindresorhus/object-assign) - ES2015 Object.assign() ponyfill
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Loading…
Reference in a new issue