Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
407 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = slice;
|
---|
7 | function slice(arrayLike, start) {
|
---|
8 | start = start | 0;
|
---|
9 | var newLen = Math.max(arrayLike.length - start, 0);
|
---|
10 | var newArr = Array(newLen);
|
---|
11 | for (var idx = 0; idx < newLen; idx++) {
|
---|
12 | newArr[idx] = arrayLike[start + idx];
|
---|
13 | }
|
---|
14 | return newArr;
|
---|
15 | }
|
---|
16 | module.exports = exports["default"]; |
---|
Note:
See
TracBrowser
for help on using the repository browser.