iterableToArrayLimitLoose.js 372 B

1234567891011121314
  1. function _iterableToArrayLimitLoose(arr, i) {
  2. if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
  3. var _arr = [];
  4. for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
  5. _arr.push(_step.value);
  6. if (i && _arr.length === i) break;
  7. }
  8. return _arr;
  9. }
  10. module.exports = _iterableToArrayLimitLoose;