iterableToArrayLimit.js 846 B

12345678910111213141516171819202122232425262728
  1. function _iterableToArrayLimit(arr, i) {
  2. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  3. if (null != _i) {
  4. var _s,
  5. _e,
  6. _x,
  7. _r,
  8. _arr = [],
  9. _n = !0,
  10. _d = !1;
  11. try {
  12. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  13. if (Object(_i) !== _i) return;
  14. _n = !1;
  15. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
  16. } catch (err) {
  17. _d = !0, _e = err;
  18. } finally {
  19. try {
  20. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  21. } finally {
  22. if (_d) throw _e;
  23. }
  24. }
  25. return _arr;
  26. }
  27. }
  28. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;