mirror of
https://github.com/sern-handler/handler
synced 2026-06-17 21:32:14 +00:00
feat: delete partition.ts
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
export function partition<T, U extends T>(condition: (el: T) => el is U, array: T[]): [U[], T[]] {
|
||||
const uArr: U[] = [];
|
||||
const vArr: T[] = [];
|
||||
for (const el of array) {
|
||||
(condition(el) ? uArr : vArr).push(el);
|
||||
}
|
||||
return [uArr, vArr];
|
||||
}
|
||||
Reference in New Issue
Block a user