Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

17
node_modules/es-toolkit/dist/compat/array/countBy.mjs generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import { isArrayLike } from "../predicate/isArrayLike.mjs";
import { iteratee } from "../util/iteratee.mjs";
//#region src/compat/array/countBy.ts
function countBy(collection, iteratee$1) {
if (collection == null) return {};
const array = isArrayLike(collection) ? Array.from(collection) : Object.values(collection);
const mapper = iteratee(iteratee$1 ?? void 0);
const result = Object.create(null);
for (let i = 0; i < array.length; i++) {
const item = array[i];
const key = mapper(item);
result[key] = (result[key] ?? 0) + 1;
}
return result;
}
//#endregion
export { countBy };