mirror of
https://github.com/SrIzan10/handler.git
synced 2026-05-01 10:45:17 +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