|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
455 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | import { drop as drop$1 } from '../../array/drop.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 drop(collection, itemsCount = 1, guard) {
|
|---|
| 7 | if (!isArrayLike(collection)) {
|
|---|
| 8 | return [];
|
|---|
| 9 | }
|
|---|
| 10 | itemsCount = guard ? 1 : toInteger(itemsCount);
|
|---|
| 11 | return drop$1(toArray(collection), itemsCount);
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | export { drop };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.