Spaces:
Running
Running
Download 731ai/node_modules/core-js/internals/array-group.js from u11310019/interactive-multi-web: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/spaces/u11310019/interactive-multi-web/resolve/main/731ai/node_modules/core-js/internals/array-group.js
- Command line
-
hf download hf://spaces/u11310019/interactive-multi-web/731ai/node_modules/core-js/internals/array-group.js
-
curl -L -o array-group.js https://huggingface.co/spaces/u11310019/interactive-multi-web/resolve/main/731ai/node_modules/core-js/internals/array-group.js
1.52 kB
| ; | |
| var bind = require('../internals/function-bind-context'); | |
| var uncurryThis = require('../internals/function-uncurry-this'); | |
| var IndexedObject = require('../internals/indexed-object'); | |
| var toObject = require('../internals/to-object'); | |
| var toPropertyKey = require('../internals/to-property-key'); | |
| var lengthOfArrayLike = require('../internals/length-of-array-like'); | |
| var objectCreate = require('../internals/object-create'); | |
| var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list'); | |
| var $Array = Array; | |
| var push = uncurryThis([].push); | |
| module.exports = function ($this, callbackfn, that, specificConstructor) { | |
| var O = toObject($this); | |
| var self = IndexedObject(O); | |
| var boundFunction = bind(callbackfn, that); | |
| var target = objectCreate(null); | |
| var length = lengthOfArrayLike(self); | |
| var index = 0; | |
| var Constructor, key, value; | |
| for (;length > index; index++) { | |
| value = self[index]; | |
| key = toPropertyKey(boundFunction(value, index, O)); | |
| // in some IE versions, `hasOwnProperty` returns incorrect result on integer keys | |
| // but since it's a `null` prototype object, we can safely use `in` | |
| if (key in target) push(target[key], value); | |
| else target[key] = [value]; | |
| } | |
| // TODO: Remove this block from `core-js@4` | |
| if (specificConstructor) { | |
| Constructor = specificConstructor(O); | |
| if (Constructor !== $Array) { | |
| for (key in target) target[key] = arrayFromConstructorAndList(Constructor, target[key]); | |
| } | |
| } return target; | |
| }; | |