This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/array/keyBy.js
T

16 lines
343 B
JavaScript

'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
function keyBy(arr, getKeyFromItem) {
const result = {};
for (let i = 0; i < arr.length; i++) {
const item = arr[i];
const key = getKeyFromItem(item);
result[key] = item;
}
return result;
}
exports.keyBy = keyBy;