⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
nodejs
/
core-js
/
internals
/
View File Name :
array-group.js
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 IE10 builds, `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; };