You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
407 B

4 years ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = slice;
  6. function slice(arrayLike, start) {
  7. start = start | 0;
  8. var newLen = Math.max(arrayLike.length - start, 0);
  9. var newArr = Array(newLen);
  10. for (var idx = 0; idx < newLen; idx++) {
  11. newArr[idx] = arrayLike[start + idx];
  12. }
  13. return newArr;
  14. }
  15. module.exports = exports["default"];