MultiLoader-Template/node_modules/es-toolkit/dist/compat/array/dropRight.mjs
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

15 lines
485 B
JavaScript

import { dropRight as dropRight$1 } from '../../array/dropRight.mjs';
import { toArray } from '../_internal/toArray.mjs';
import { isArrayLike } from '../predicate/isArrayLike.mjs';
import { toInteger } from '../util/toInteger.mjs';
function dropRight(collection, itemsCount = 1, guard) {
if (!isArrayLike(collection)) {
return [];
}
itemsCount = guard ? 1 : toInteger(itemsCount);
return dropRight$1(toArray(collection), itemsCount);
}
export { dropRight };