Update dependencies

This commit is contained in:
grandeljay 2022-06-08 12:36:39 +02:00
parent 686c644751
commit 6b024302d3
7679 changed files with 179547 additions and 183379 deletions

2
node_modules/clone/.npmignore generated vendored
View file

@ -1,4 +1,4 @@
/node_modules/
/test.js
/*.html
/.travis.yml
*.html

88
node_modules/clone/README.md generated vendored
View file

@ -1,20 +1,17 @@
# clone
[![build status](https://secure.travis-ci.org/pvorb/clone.svg)](http://travis-ci.org/pvorb/clone) [![downloads](https://img.shields.io/npm/dt/clone.svg)](http://npm-stat.com/charts.html?package=clone)
[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone)
offers foolproof _deep cloning_ of objects, arrays, numbers, strings, maps,
sets, promises, etc. in JavaScript.
[![info badge](https://nodei.co/npm/clone.png?downloads=true&downloadRank=true&stars=true)](http://npm-stat.com/charts.html?package=clone)
**XSS vulnerability detected**
offers foolproof _deep cloning_ of objects, arrays, numbers, strings etc. in JavaScript.
## Installation
npm install clone
(It also works with browserify, ender or standalone. You may want to use the
option `noParse` in browserify to reduce the resulting file size, since usually
`Buffer`s are not needed in browsers.)
(It also works with browserify, ender or standalone.)
## Example
@ -53,15 +50,10 @@ can clone dates in arrays in objects, for example.
* `circular` -- boolean
Call `clone` with `circular` set to `false` if you are certain that `obj`
contains no circular references. This will give better performance if
needed. There is no error if `undefined` or `null` is passed as `obj`.
contains no circular references. This will give better performance if needed.
There is no error if `undefined` or `null` is passed as `obj`.
* `depth` -- depth to which the object is to be cloned (optional,
defaults to infinity)
* `prototype` -- sets the prototype to be used when cloning an object.
(optional, defaults to parent prototype).
* `includeNonEnumerable` -- set to `true` if the non-enumerable properties
should be cloned as well. Non-enumerable properties on the prototype chain
will be ignored. (optional, defaults to `false`)
`clone.clonePrototype(obj)`
@ -98,83 +90,23 @@ So, `b.myself` points to `b`, not `a`. Neat!
npm test
## Changelog
### v2.1.2
#### 2018-03-21
- Use `Buffer.allocUnsafe()` on Node >= 4.5.0 (contributed by @ChALkeR)
### v2.1.1
#### 2017-03-09
- Fix build badge in README
- Add support for cloning Maps and Sets on Internet Explorer
### v2.1.0
#### 2016-11-22
- Add support for cloning Errors
- Exclude non-enumerable symbol-named object properties from cloning
- Add option to include non-enumerable own properties of objects
### v2.0.0
#### 2016-09-28
- Add support for cloning ES6 Maps, Sets, Promises, and Symbols
### v1.0.3
#### 2017-11-08
- Close XSS vulnerability in the NPM package, which included the file
`test-apart-ctx.html`. This vulnerability was disclosed by Juho Nurminen of
2NS - Second Nature Security.
### v1.0.2 (deprecated)
#### 2015-03-25
- Fix call on getRegExpFlags
- Refactor utilities
- Refactor test suite
### v1.0.1 (deprecated)
#### 2015-03-04
- Fix nodeunit version
- Directly call getRegExpFlags
### v1.0.0 (deprecated)
#### 2015-02-10
- Improve browser support
- Improve browser testability
- Move helper methods to private namespace
## Caveat
Some special objects like a socket or `process.stdout`/`stderr` are known to not
be cloneable. If you find other objects that cannot be cloned, please [open an
issue](https://github.com/pvorb/clone/issues/new).
issue](https://github.com/pvorb/node-clone/issues/new).
## Bugs and Issues
If you encounter any bugs or issues, feel free to [open an issue at
github](https://github.com/pvorb/clone/issues) or send me an email to
github](https://github.com/pvorb/node-clone/issues) or send me an email to
<paul@vorba.ch>. I also always like to hear from you, if youre using my code.
## License
Copyright © 2011-2016 [Paul Vorbach](https://paul.vorba.ch/) and
[contributors](https://github.com/pvorb/clone/graphs/contributors).
Copyright © 2011-2015 [Paul Vorbach](http://paul.vorba.ch/) and
[contributors](https://github.com/pvorb/node-clone/graphs/contributors).
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

113
node_modules/clone/clone.js generated vendored
View file

@ -1,33 +1,6 @@
var clone = (function() {
'use strict';
function _instanceof(obj, type) {
return type != null && obj instanceof type;
}
var nativeMap;
try {
nativeMap = Map;
} catch(_) {
// maybe a reference error because no `Map`. Give it a dummy value that no
// value will ever be an instanceof.
nativeMap = function() {};
}
var nativeSet;
try {
nativeSet = Set;
} catch(_) {
nativeSet = function() {};
}
var nativePromise;
try {
nativePromise = Promise;
} catch(_) {
nativePromise = function() {};
}
/**
* Clones (copies) an Object using deep copying.
*
@ -45,16 +18,14 @@ try {
* a particular depth. (optional - defaults to Infinity)
* @param `prototype` - sets the prototype to be used when cloning an object.
* (optional - defaults to parent prototype).
* @param `includeNonEnumerable` - set to true if the non-enumerable properties
* should be cloned as well. Non-enumerable properties on the prototype
* chain will be ignored. (optional - false by default)
*/
function clone(parent, circular, depth, prototype, includeNonEnumerable) {
function clone(parent, circular, depth, prototype) {
var filter;
if (typeof circular === 'object') {
depth = circular.depth;
prototype = circular.prototype;
includeNonEnumerable = circular.includeNonEnumerable;
circular = circular.circular;
filter = circular.filter;
circular = circular.circular
}
// maintain two arrays for circular references, where corresponding parents
// and children have the same index
@ -75,7 +46,7 @@ function clone(parent, circular, depth, prototype, includeNonEnumerable) {
if (parent === null)
return null;
if (depth === 0)
if (depth == 0)
return parent;
var child;
@ -84,19 +55,7 @@ function clone(parent, circular, depth, prototype, includeNonEnumerable) {
return parent;
}
if (_instanceof(parent, nativeMap)) {
child = new nativeMap();
} else if (_instanceof(parent, nativeSet)) {
child = new nativeSet();
} else if (_instanceof(parent, nativePromise)) {
child = new nativePromise(function (resolve, reject) {
parent.then(function(value) {
resolve(_clone(value, depth - 1));
}, function(err) {
reject(_clone(err, depth - 1));
});
});
} else if (clone.__isArray(parent)) {
if (clone.__isArray(parent)) {
child = [];
} else if (clone.__isRegExp(parent)) {
child = new RegExp(parent.source, __getRegExpFlags(parent));
@ -113,8 +72,6 @@ function clone(parent, circular, depth, prototype, includeNonEnumerable) {
}
parent.copy(child);
return child;
} else if (_instanceof(parent, Error)) {
child = Object.create(parent);
} else {
if (typeof prototype == 'undefined') {
proto = Object.getPrototypeOf(parent);
@ -136,20 +93,6 @@ function clone(parent, circular, depth, prototype, includeNonEnumerable) {
allChildren.push(child);
}
if (_instanceof(parent, nativeMap)) {
parent.forEach(function(value, key) {
var keyChild = _clone(key, depth - 1);
var valueChild = _clone(value, depth - 1);
child.set(keyChild, valueChild);
});
}
if (_instanceof(parent, nativeSet)) {
parent.forEach(function(value) {
var entryChild = _clone(value, depth - 1);
child.add(entryChild);
});
}
for (var i in parent) {
var attrs;
if (proto) {
@ -162,40 +105,6 @@ function clone(parent, circular, depth, prototype, includeNonEnumerable) {
child[i] = _clone(parent[i], depth - 1);
}
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(parent);
for (var i = 0; i < symbols.length; i++) {
// Don't need to worry about cloning a symbol because it is a primitive,
// like a number or string.
var symbol = symbols[i];
var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
continue;
}
child[symbol] = _clone(parent[symbol], depth - 1);
if (!descriptor.enumerable) {
Object.defineProperty(child, symbol, {
enumerable: false
});
}
}
}
if (includeNonEnumerable) {
var allPropertyNames = Object.getOwnPropertyNames(parent);
for (var i = 0; i < allPropertyNames.length; i++) {
var propertyName = allPropertyNames[i];
var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
if (descriptor && descriptor.enumerable) {
continue;
}
child[propertyName] = _clone(parent[propertyName], depth - 1);
Object.defineProperty(child, propertyName, {
enumerable: false
});
}
}
return child;
}
@ -222,22 +131,22 @@ clone.clonePrototype = function clonePrototype(parent) {
function __objToStr(o) {
return Object.prototype.toString.call(o);
}
};
clone.__objToStr = __objToStr;
function __isDate(o) {
return typeof o === 'object' && __objToStr(o) === '[object Date]';
}
};
clone.__isDate = __isDate;
function __isArray(o) {
return typeof o === 'object' && __objToStr(o) === '[object Array]';
}
};
clone.__isArray = __isArray;
function __isRegExp(o) {
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
}
};
clone.__isRegExp = __isRegExp;
function __getRegExpFlags(re) {
@ -246,7 +155,7 @@ function __getRegExpFlags(re) {
if (re.ignoreCase) flags += 'i';
if (re.multiline) flags += 'm';
return flags;
}
};
clone.__getRegExpFlags = __getRegExpFlags;
return clone;

9
node_modules/clone/package.json generated vendored
View file

@ -8,7 +8,7 @@
"function",
"date"
],
"version": "2.1.2",
"version": "1.0.4",
"repository": {
"type": "git",
"url": "git://github.com/pvorb/node-clone.git"
@ -34,12 +34,7 @@
"Nathan Zadoks (https://github.com/nathan7)",
"Róbert Oroszi <robert+gh@oroszi.net> (https://github.com/oroce)",
"Aurélio A. Heckert (http://softwarelivre.org/aurium)",
"Guy Ellis (http://www.guyellisrocks.com/)",
"fscherwi (https://fscherwi.github.io)",
"rictic (https://github.com/rictic)",
"Martin Jurča (https://github.com/jurca)",
"Misery Lee <miserylee@foxmail.com> (https://github.com/miserylee)",
"Clemens Wolff (https://github.com/c-w)"
"Guy Ellis (http://www.guyellisrocks.com/)"
],
"license": "MIT",
"engines": {