everyutil
Version:
A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.
10 lines (9 loc) • 326 B
TypeScript
/**
* Keeps tailing elements until predicate returns false.
* @author @dailker
* @template T
* @param {T[]} array
* @param {(item: T, idx: number, arr: T[]) => boolean} predicate
* @returns {T[]}
*/
export declare function tailUntil<T>(array: T[], predicate: (item: T, idx: number, arr: T[]) => boolean): T[];