build(utils): build26 from 45504a2b

This commit is contained in:
publish
2026-08-05 18:57:34 +02:00
commit 9fed1b6ef2
236 changed files with 2331 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
//#region src/array/uniq-by.d.ts
/**
* Returns array with duplicates removed, keeping the LAST occurrence.
* Useful for feature merging where extensions should override base features.
*
* @example
* ```ts
* const features = [{ id: 'a', v: 1 }, { id: 'b', v: 2 }, { id: 'a', v: 3 }];
* uniqBy(features, s => s.id);
* // => [{ id: 'b', v: 2 }, { id: 'a', v: 3 }]
* ```
*/
declare function uniqBy<T, K>(arr: T[], mapper: (item: T) => K): T[];
//#endregion
export { uniqBy };
//# sourceMappingURL=uniq-by.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"uniq-by.d.ts","names":[],"sources":["../../src/array/uniq-by.ts"],"mappings":";;;;;;;;;;;;iBAWgB,OAAO,GAAG,GAAG,KAAK,KAAK,SAAS,MAAM,MAAM,IAAI"}
+21
View File
@@ -0,0 +1,21 @@
//#region src/array/uniq-by.ts
/**
* Returns array with duplicates removed, keeping the LAST occurrence.
* Useful for feature merging where extensions should override base features.
*
* @example
* ```ts
* const features = [{ id: 'a', v: 1 }, { id: 'b', v: 2 }, { id: 'a', v: 3 }];
* uniqBy(features, s => s.id);
* // => [{ id: 'b', v: 2 }, { id: 'a', v: 3 }]
* ```
*/
function uniqBy(arr, mapper) {
const seen = /* @__PURE__ */ new Map();
arr.forEach((item, i) => seen.set(mapper(item), i));
return arr.filter((_, i) => [...seen.values()].includes(i));
}
//#endregion
export { uniqBy };
//# sourceMappingURL=uniq-by.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"uniq-by.js","names":[],"sources":["../../src/array/uniq-by.ts"],"sourcesContent":["/**\n * Returns array with duplicates removed, keeping the LAST occurrence.\n * Useful for feature merging where extensions should override base features.\n *\n * @example\n * ```ts\n * const features = [{ id: 'a', v: 1 }, { id: 'b', v: 2 }, { id: 'a', v: 3 }];\n * uniqBy(features, s => s.id);\n * // => [{ id: 'b', v: 2 }, { id: 'a', v: 3 }]\n * ```\n */\nexport function uniqBy<T, K>(arr: T[], mapper: (item: T) => K): T[] {\n const seen = new Map<K, number>();\n arr.forEach((item, i) => seen.set(mapper(item), i));\n return arr.filter((_, i) => [...seen.values()].includes(i));\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,OAAa,KAAU,QAA6B;CAClE,MAAM,uBAAO,IAAI,IAAe;CAChC,IAAI,SAAS,MAAM,MAAM,KAAK,IAAI,OAAO,IAAI,GAAG,CAAC,CAAC;CAClD,OAAO,IAAI,QAAQ,GAAG,MAAM,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC5D"}