Updating NPM dependencies
This commit is contained in:
17
node_modules/jest-util/build/deepCyclicCopy.js
generated
vendored
17
node_modules/jest-util/build/deepCyclicCopy.js
generated
vendored
@@ -13,21 +13,6 @@ exports.default = deepCyclicCopy;
|
||||
*/
|
||||
const EMPTY = new Set();
|
||||
|
||||
// Node 6 does not have gOPDs, so we define a simple polyfill for it.
|
||||
if (!Object.getOwnPropertyDescriptors) {
|
||||
// @ts-ignore: polyfill
|
||||
Object.getOwnPropertyDescriptors = obj => {
|
||||
const list = {};
|
||||
Object.getOwnPropertyNames(obj)
|
||||
.concat(Object.getOwnPropertySymbols(obj))
|
||||
.forEach(key => {
|
||||
// @ts-ignore: assignment with a Symbol is OK.
|
||||
list[key] = Object.getOwnPropertyDescriptor(obj, key);
|
||||
});
|
||||
return list;
|
||||
};
|
||||
}
|
||||
|
||||
function deepCyclicCopy(
|
||||
value,
|
||||
options = {
|
||||
@@ -79,7 +64,7 @@ function deepCyclicCopyObject(object, options, cycles) {
|
||||
|
||||
function deepCyclicCopyArray(array, options, cycles) {
|
||||
const newArray = options.keepPrototype
|
||||
? new (Object.getPrototypeOf(array)).constructor(array.length)
|
||||
? new (Object.getPrototypeOf(array).constructor)(array.length)
|
||||
: [];
|
||||
const length = array.length;
|
||||
cycles.set(array, newArray);
|
||||
|
||||
Reference in New Issue
Block a user