COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220220706/https://github.com/lodash/lodash/blob/master/dropWhile.js
Permalink
Cannot retrieve contributors at this time
30 lines (28 sloc)
873 Bytes
import baseWhile from './.internal/baseWhile.js'
/**
* Creates a slice of `array` excluding elements dropped from the beginning.
* Elements are dropped until `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index, array).
*
* @since 3.0.0
* @category Array
* @param {Array } array The array to query.
* @param {Function } predicate The function invoked per iteration.
* @returns {Array } Returns the slice of `array`.
* @example
*
* const users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': true },
* { 'user': 'pebbles', 'active': false }
* ]
*
* dropWhile(users, ({ active }) => active)
* // => objects for ['pebbles']
*/
function dropWhile ( array , predicate ) {
return ( array != null && array . length )
? baseWhile ( array , predicate , true )
: [ ]
}
export default dropWhile
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.