@procore/core-react
Version:
React library of Procore Design Guidelines
6 lines (5 loc) • 319 B
TypeScript
/**
* This implementation provides item and item's index to the predicate function and works only with arrays.
* ramda's partition - doesn't provide indexes, but works with any iterable object
* */
export declare function partition<T>(predicate: (item: T, index: number) => boolean, list: readonly T[]): [T[], T[]];