node_modules/es-abstract/2023/ArrayCreate.js in immosquare-cleaner-0.1.60 vs node_modules/es-abstract/2023/ArrayCreate.js in immosquare-cleaner-0.1.61

- old
+ new

@@ -4,24 +4,12 @@ var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); var $RangeError = require('es-errors/range'); var $SyntaxError = require('es-errors/syntax'); var $TypeError = require('es-errors/type'); - -var isInteger = require('../helpers/isInteger'); - -var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; - -var hasProto = require('has-proto')(); - -var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - hasProto - ? function (O, proto) { - O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign - return O; - } - : null -); +var isInteger = require('math-intrinsics/isInteger'); +var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength'); +var $setProto = require('set-proto'); // https://262.ecma-international.org/12.0/#sec-arraycreate module.exports = function ArrayCreate(length) { if (!isInteger(length) || length < 0) {