filterSplit

Splits an array into two arrays based on the result of a predicate function.

Signature

export declare function filterSplit<Element, Never = Element>(arr: (Element | Never)[], func: (value: Element | Never) => boolean): {    expect: Element[];    never: Never[];};
JSDoc
Parameters
arr
The array to split.
func
The predicate function used to test elements of the array.
Returns

An object containing two arrays: one with elements that passed the test and one with elements that did not.

Members

This export does not declare public properties or methods in the generated declaration file.