1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-17 01:16:00 +00:00
This commit is contained in:
MatteZ02
2020-03-04 13:43:21 +02:00
parent 79f8a18164
commit da84fcfed1
1292 changed files with 93623 additions and 35760 deletions

46
node_modules/deep-extend/CHANGELOG.md generated vendored Normal file
View File

@ -0,0 +1,46 @@
Changelog
=========
v0.6.0
------
- Updated "devDependencies" versions to fix vulnerability alerts
- Dropped support of io.js and node.js v0.12.x and lower since new versions of
"devDependencies" couldn't work with those old node.js versions
(minimal supported version of node.js now is v4.0.0)
v0.5.1
------
- Fix prototype pollution vulnerability (thanks to @mwakerman for the PR)
- Avoid using deprecated Buffer API (thanks to @ChALkeR for the PR)
v0.5.0
------
- Auto-testing provided by Travis CI;
- Support older Node.JS versions (`v0.11.x` and `v0.10.x`);
- Removed tests files from npm package.
v0.4.2
------
- Fix for `null` as an argument.
v0.4.1
------
- Removed test code from <b>npm</b> package
([see pull request #21](https://github.com/unclechu/node-deep-extend/pull/21));
- Increased minimal version of Node from `0.4.0` to `0.12.0`
(because can't run tests on lesser version anyway).
v0.4.0
------
- **WARNING!** Broken backward compatibility with `v0.3.x`;
- Fixed bug with extending arrays instead of cloning;
- Deep cloning for arrays;
- Check for own property;
- Fixed some documentation issues;
- Strict JS mode.

20
node_modules/deep-extend/LICENSE generated vendored Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2013-2018, Viacheslav Lotsmanov
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/deep-extend/README.md generated vendored Normal file
View File

@ -0,0 +1,91 @@
Deep Extend
===========
Recursive object extending.
[![Build Status](https://api.travis-ci.org/unclechu/node-deep-extend.svg?branch=master)](https://travis-ci.org/unclechu/node-deep-extend)
[![NPM](https://nodei.co/npm/deep-extend.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/deep-extend/)
Install
-------
```bash
$ npm install deep-extend
```
Usage
-----
```javascript
var deepExtend = require('deep-extend');
var obj1 = {
a: 1,
b: 2,
d: {
a: 1,
b: [],
c: { test1: 123, test2: 321 }
},
f: 5,
g: 123,
i: 321,
j: [1, 2]
};
var obj2 = {
b: 3,
c: 5,
d: {
b: { first: 'one', second: 'two' },
c: { test2: 222 }
},
e: { one: 1, two: 2 },
f: [],
g: (void 0),
h: /abc/g,
i: null,
j: [3, 4]
};
deepExtend(obj1, obj2);
console.log(obj1);
/*
{ a: 1,
b: 3,
d:
{ a: 1,
b: { first: 'one', second: 'two' },
c: { test1: 123, test2: 222 } },
f: [],
g: undefined,
c: 5,
e: { one: 1, two: 2 },
h: /abc/g,
i: null,
j: [3, 4] }
*/
```
Unit testing
------------
```bash
$ npm test
```
Changelog
---------
[CHANGELOG.md](./CHANGELOG.md)
Any issues?
-----------
Please, report about issues
[here](https://github.com/unclechu/node-deep-extend/issues).
License
-------
[MIT](./LICENSE)

1
node_modules/deep-extend/index.js generated vendored Normal file
View File

@ -0,0 +1 @@
module.exports = require('./lib/deep-extend');

150
node_modules/deep-extend/lib/deep-extend.js generated vendored Normal file
View File

@ -0,0 +1,150 @@
/*!
* @description Recursive object extending
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
* @license MIT
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
*
* 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.
*/
'use strict';
function isSpecificValue(val) {
return (
val instanceof Buffer
|| val instanceof Date
|| val instanceof RegExp
) ? true : false;
}
function cloneSpecificValue(val) {
if (val instanceof Buffer) {
var x = Buffer.alloc
? Buffer.alloc(val.length)
: new Buffer(val.length);
val.copy(x);
return x;
} else if (val instanceof Date) {
return new Date(val.getTime());
} else if (val instanceof RegExp) {
return new RegExp(val);
} else {
throw new Error('Unexpected situation');
}
}
/**
* Recursive cloning array.
*/
function deepCloneArray(arr) {
var clone = [];
arr.forEach(function (item, index) {
if (typeof item === 'object' && item !== null) {
if (Array.isArray(item)) {
clone[index] = deepCloneArray(item);
} else if (isSpecificValue(item)) {
clone[index] = cloneSpecificValue(item);
} else {
clone[index] = deepExtend({}, item);
}
} else {
clone[index] = item;
}
});
return clone;
}
function safeGetProperty(object, property) {
return property === '__proto__' ? undefined : object[property];
}
/**
* Extening object that entered in first argument.
*
* Returns extended object or false if have no target object or incorrect type.
*
* If you wish to clone source object (without modify it), just use empty new
* object as first argument, like this:
* deepExtend({}, yourObj_1, [yourObj_N]);
*/
var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
if (arguments.length < 1 || typeof arguments[0] !== 'object') {
return false;
}
if (arguments.length < 2) {
return arguments[0];
}
var target = arguments[0];
// convert arguments to array and cut off target object
var args = Array.prototype.slice.call(arguments, 1);
var val, src, clone;
args.forEach(function (obj) {
// skip argument if isn't an object, is null, or is an array
if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
return;
}
Object.keys(obj).forEach(function (key) {
src = safeGetProperty(target, key); // source value
val = safeGetProperty(obj, key); // new value
// recursion prevention
if (val === target) {
return;
/**
* if new value isn't object then just overwrite by new value
* instead of extending.
*/
} else if (typeof val !== 'object' || val === null) {
target[key] = val;
return;
// just clone arrays (and recursive clone objects inside)
} else if (Array.isArray(val)) {
target[key] = deepCloneArray(val);
return;
// custom cloning and overwrite for specific objects
} else if (isSpecificValue(val)) {
target[key] = cloneSpecificValue(val);
return;
// overwrite by new value if source isn't object or array
} else if (typeof src !== 'object' || src === null || Array.isArray(src)) {
target[key] = deepExtend({}, val);
return;
// source value and new value is objects both, extending...
} else {
target[key] = deepExtend(src, val);
return;
}
});
});
return target;
};

92
node_modules/deep-extend/package.json generated vendored Normal file
View File

@ -0,0 +1,92 @@
{
"_from": "deep-extend@^0.6.0",
"_id": "deep-extend@0.6.0",
"_inBundle": false,
"_integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"_location": "/deep-extend",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "deep-extend@^0.6.0",
"name": "deep-extend",
"escapedName": "deep-extend",
"rawSpec": "^0.6.0",
"saveSpec": null,
"fetchSpec": "^0.6.0"
},
"_requiredBy": [
"/rc"
],
"_resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"_shasum": "c4fa7c95404a17a9c3e8ca7e1537312b736330ac",
"_spec": "deep-extend@^0.6.0",
"_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix-V3\\node_modules\\rc",
"author": {
"name": "Viacheslav Lotsmanov",
"email": "lotsmanov89@gmail.com"
},
"bugs": {
"url": "https://github.com/unclechu/node-deep-extend/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Romain Prieto",
"url": "https://github.com/rprieto"
},
{
"name": "Max Maximov",
"url": "https://github.com/maxmaximov"
},
{
"name": "Marshall Bowers",
"url": "https://github.com/maxdeviant"
},
{
"name": "Misha Wakerman",
"url": "https://github.com/mwakerman"
}
],
"deprecated": false,
"description": "Recursive object extending",
"devDependencies": {
"mocha": "5.2.0",
"should": "13.2.1"
},
"engines": {
"node": ">=4.0.0"
},
"files": [
"index.js",
"lib/"
],
"homepage": "https://github.com/unclechu/node-deep-extend",
"keywords": [
"deep-extend",
"extend",
"deep",
"recursive",
"xtend",
"clone",
"merge",
"json"
],
"license": "MIT",
"licenses": [
{
"type": "MIT",
"url": "https://raw.githubusercontent.com/unclechu/node-deep-extend/master/LICENSE"
}
],
"main": "lib/deep-extend.js",
"name": "deep-extend",
"repository": {
"type": "git",
"url": "git://github.com/unclechu/node-deep-extend.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.6.0"
}