This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

68
node_modules/deep-assign/index.js generated vendored Normal file
View File

@ -0,0 +1,68 @@
'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 assignKey(to, from, key) {
var val = from[key];
if (val === undefined || val === null) {
return;
}
if (hasOwnProperty.call(to, key)) {
if (to[key] === undefined || to[key] === null) {
throw new TypeError('Cannot convert undefined or null to object (' + key + ')');
}
}
if (!hasOwnProperty.call(to, key) || !isObj(val)) {
to[key] = val;
} else {
to[key] = assign(Object(to[key]), from[key]);
}
}
function assign(to, from) {
if (to === from) {
return to;
}
from = Object(from);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
assignKey(to, from, key);
}
}
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
assignKey(to, from, symbols[i]);
}
}
}
return to;
}
module.exports = function deepAssign(target) {
target = toObject(target);
for (var s = 1; s < arguments.length; s++) {
assign(target, arguments[s]);
}
return target;
};

21
node_modules/deep-assign/license generated vendored Normal file
View 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.

51
node_modules/deep-assign/package.json generated vendored Normal file
View File

@ -0,0 +1,51 @@
{
"name": "deep-assign",
"version": "3.0.0",
"description": "Recursive Object.assign()",
"license": "MIT",
"repository": "sindresorhus/deep-assign",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"object",
"obj",
"assign",
"extend",
"properties",
"merge",
"clone",
"copy",
"mixin",
"deep",
"recursive",
"key",
"keys",
"values",
"prop",
"properties"
],
"dependencies": {
"is-obj": "^1.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
},
"xo": {
"ignores": [
"test.js"
]
}
}

35
node_modules/deep-assign/readme.md generated vendored Normal file
View File

@ -0,0 +1,35 @@
# deep-assign [![Build Status](https://travis-ci.org/sindresorhus/deep-assign.svg?branch=master)](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)