UNPKG

crystalline

Version:

A modern utility library with a strong emphasis on readability. Make your code crystal clear.

8 lines (7 loc) 280 B
declare const split: <T>(arr: T[]) => { atIndex: (index: number) => [T[], T[]]; everyNthIndex: (n: number) => T[][]; atFirstEncounterOf: (predicate: (a: T) => boolean) => T[][]; byItemsSatisfying: (predicate: (a: T) => boolean) => [T[], T[]]; }; export { split };