iterableToArrayLimit.js 857 B

123456789101112131415161718192021222324252627282930313233343536
  1. var _Symbol = require("@babel/runtime-corejs3/core-js/symbol");
  2. var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
  3. function _iterableToArrayLimit(arr, i) {
  4. var _i = arr && (typeof _Symbol !== "undefined" && _getIteratorMethod(arr) || arr["@@iterator"]);
  5. if (_i == null) return;
  6. var _arr = [];
  7. var _n = true;
  8. var _d = false;
  9. var _s, _e;
  10. try {
  11. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  12. _arr.push(_s.value);
  13. if (i && _arr.length === i) break;
  14. }
  15. } catch (err) {
  16. _d = true;
  17. _e = err;
  18. } finally {
  19. try {
  20. if (!_n && _i["return"] != null) _i["return"]();
  21. } finally {
  22. if (_d) throw _e;
  23. }
  24. }
  25. return _arr;
  26. }
  27. module.exports = _iterableToArrayLimit;
  28. module.exports["default"] = module.exports, module.exports.__esModule = true;