mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
16 lines
407 B
JavaScript
16 lines
407 B
JavaScript
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = slice;
|
||
|
function slice(arrayLike, start) {
|
||
|
start = start | 0;
|
||
|
var newLen = Math.max(arrayLike.length - start, 0);
|
||
|
var newArr = Array(newLen);
|
||
|
for (var idx = 0; idx < newLen; idx++) {
|
||
|
newArr[idx] = arrayLike[start + idx];
|
||
|
}
|
||
|
return newArr;
|
||
|
}
|
||
|
module.exports = exports["default"];
|