You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
621 B

4 years ago
  1. export default function _iterableToArrayLimit(arr, i) {
  2. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  3. return;
  4. }
  5. var _arr = [];
  6. var _n = true;
  7. var _d = false;
  8. var _e = undefined;
  9. try {
  10. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  11. _arr.push(_s.value);
  12. if (i && _arr.length === i) break;
  13. }
  14. } catch (err) {
  15. _d = true;
  16. _e = err;
  17. } finally {
  18. try {
  19. if (!_n && _i["return"] != null) _i["return"]();
  20. } finally {
  21. if (_d) throw _e;
  22. }
  23. }
  24. return _arr;
  25. }