source: node_modules/es-toolkit/dist/compat/array/takeRight.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: 458 bytes
Line 
1import { takeRight as takeRight$1 } from '../../array/takeRight.mjs';
2import { toArray } from '../_internal/toArray.mjs';
3import { isArrayLike } from '../predicate/isArrayLike.mjs';
4import { toInteger } from '../util/toInteger.mjs';
5
6function takeRight(arr, count = 1, guard) {
7 count = guard ? 1 : toInteger(count);
8 if (count <= 0 || !isArrayLike(arr)) {
9 return [];
10 }
11 return takeRight$1(toArray(arr), count);
12}
13
14export { takeRight };
Note: See TracBrowser for help on using the repository browser.