UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

13 lines (12 loc) 540 B
export default baseWhile; /** * The base implementation of methods like `dropWhile` and `takeWhile`. * * @private * @param {Array} array The array to query. * @param {Function} predicate The function invoked per iteration. * @param {boolean} [isDrop] Specify dropping elements instead of taking them. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Array} Returns the slice of `array`. */ declare function baseWhile(array: any[], predicate: Function, isDrop?: boolean, fromRight?: boolean): any[];