source: node_modules/es-toolkit/dist/compat/array/dropRight.mjs@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 485 bytes
Line 
1import { dropRight as dropRight$1 } from '../../array/dropRight.mjs';
2import { toArray } from '../_internal/toArray.mjs';
3import { isArrayLike } from '../predicate/isArrayLike.mjs';
4import { toInteger } from '../util/toInteger.mjs';
5
6function dropRight(collection, itemsCount = 1, guard) {
7 if (!isArrayLike(collection)) {
8 return [];
9 }
10 itemsCount = guard ? 1 : toInteger(itemsCount);
11 return dropRight$1(toArray(collection), itemsCount);
12}
13
14export { dropRight };
Note: See TracBrowser for help on using the repository browser.