wip: migrate to bun

This commit is contained in:
jdalton
2023-09-16 14:47:50 -07:00
parent 2da024c3b4
commit 97d4a2fe19
1052 changed files with 30244 additions and 26856 deletions

28
src/dropWhile.ts Normal file
View File

@@ -0,0 +1,28 @@
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;