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/takeWhile.mjs
T

14 lines
292 B
JavaScript

function takeWhile(arr, shouldContinueTaking) {
const result = [];
for (let i = 0; i < arr.length; i++) {
const item = arr[i];
if (!shouldContinueTaking(item)) {
break;
}
result.push(item);
}
return result;
}
export { takeWhile };