Spaces:
Running
Running
Download 731ai/node_modules/core-js/modules/es.array.push.js from u11310019/interactive-multi-web: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/spaces/u11310019/interactive-multi-web/resolve/main/731ai/node_modules/core-js/modules/es.array.push.js
- Command line
-
hf download hf://spaces/u11310019/interactive-multi-web/731ai/node_modules/core-js/modules/es.array.push.js
-
curl -L -o es.array.push.js https://huggingface.co/spaces/u11310019/interactive-multi-web/resolve/main/731ai/node_modules/core-js/modules/es.array.push.js
1.48 kB
| ; | |
| var $ = require('../internals/export'); | |
| var toObject = require('../internals/to-object'); | |
| var lengthOfArrayLike = require('../internals/length-of-array-like'); | |
| var setArrayLength = require('../internals/array-set-length'); | |
| var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer'); | |
| var fails = require('../internals/fails'); | |
| var INCORRECT_TO_LENGTH = fails(function () { | |
| return [].push.call({ length: 0x100000000 }, 1) !== 4294967297; | |
| }); | |
| // V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError | |
| // https://bugs.chromium.org/p/v8/issues/detail?id=12681 | |
| var properErrorOnNonWritableLength = function () { | |
| try { | |
| // eslint-disable-next-line es/no-object-defineproperty -- safe | |
| Object.defineProperty([], 'length', { writable: false }).push(); | |
| } catch (error) { | |
| return error instanceof TypeError; | |
| } | |
| }; | |
| var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength(); | |
| // `Array.prototype.push` method | |
| // https://tc39.es/ecma262/#sec-array.prototype.push | |
| $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, { | |
| // eslint-disable-next-line no-unused-vars -- required for `.length` | |
| push: function push(item) { | |
| var O = toObject(this); | |
| var len = lengthOfArrayLike(O); | |
| var argCount = arguments.length; | |
| doesNotExceedSafeInteger(len + argCount); | |
| for (var i = 0; i < argCount; i++) { | |
| O[len] = arguments[i]; | |
| len++; | |
| } | |
| setArrayLength(O, len); | |
| return len; | |
| } | |
| }); | |