This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/array/dropWhile.mjs
T

10 lines
266 B
JavaScript

function dropWhile(arr, canContinueDropping) {
const dropEndIndex = arr.findIndex((item, index, arr) => !canContinueDropping(item, index, arr));
if (dropEndIndex === -1) {
return [];
}
return arr.slice(dropEndIndex);
}
export { dropWhile };