|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
361 bytes
|
| Line | |
|---|
| 1 | import { slice } from './_setup.js';
|
|---|
| 2 |
|
|---|
| 3 | // Returns everything but the last entry of the array. Especially useful on
|
|---|
| 4 | // the arguments object. Passing **n** will return all the values in
|
|---|
| 5 | // the array, excluding the last N.
|
|---|
| 6 | export default function initial(array, n, guard) {
|
|---|
| 7 | return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
|
|---|
| 8 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.