|
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 | |
|---|
| 1 | import { takeRight as takeRight$1 } from '../../array/takeRight.mjs';
|
|---|
| 2 | import { toArray } from '../_internal/toArray.mjs';
|
|---|
| 3 | import { isArrayLike } from '../predicate/isArrayLike.mjs';
|
|---|
| 4 | import { toInteger } from '../util/toInteger.mjs';
|
|---|
| 5 |
|
|---|
| 6 | function 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 |
|
|---|
| 14 | export { takeRight };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.