iterableToArrayLimit.js 745 B

12345678910111213141516171819202122232425262728293031
  1. import _Symbol from "@babel/runtime-corejs3/core-js/symbol";
  2. import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
  3. export default 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. }