source: node_modules/es-toolkit/dist/compat/array/last.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: 309 bytes
Line 
1import { last as last$1 } from '../../array/last.mjs';
2import { toArray } from '../_internal/toArray.mjs';
3import { isArrayLike } from '../predicate/isArrayLike.mjs';
4
5function last(array) {
6 if (!isArrayLike(array)) {
7 return undefined;
8 }
9 return last$1(toArray(array));
10}
11
12export { last };
Note: See TracBrowser for help on using the repository browser.