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/dropRightWhile.js
T

15 lines
356 B
JavaScript

'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
function dropRightWhile(arr, canContinueDropping) {
for (let i = arr.length - 1; i >= 0; i--) {
if (!canContinueDropping(arr[i], i, arr)) {
return arr.slice(0, i + 1);
}
}
return [];
}
exports.dropRightWhile = dropRightWhile;