_iterable_to_array_limit.js 780 B

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