rm unsed splibBy function

This commit is contained in:
tmshv committed 2022-09-06 13:06:04 +03:00
1 parent 15cdfc940f
commit 73a9635129
1 file changed
-10
-10
View File
@@ -1,13 +1,3 @@
export function splitBy(fn) {
return items => {
return items.reduce((acc, item) => {
const key = fn(item)
const items = acc.get(key) || []
return acc.set(key, [...items, item])
}, new Map())
}
}
export function insertBetween<T, I = T>(items: T[], fn: (i: number) => I): Array<T | I> {
return items.reduce<Array<T | I>>((acc, x, i) => {