createForOfIteratorHelperLoose.js 750 B

12345678910111213141516171819
  1. import unsupportedIterableToArray from "./unsupportedIterableToArray.js";
  2. function _createForOfIteratorHelperLoose(r, e) {
  3. var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  4. if (t) return (t = t.call(r)).next.bind(t);
  5. if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
  6. t && (r = t);
  7. var o = 0;
  8. return function () {
  9. return o >= r.length ? {
  10. done: !0
  11. } : {
  12. done: !1,
  13. value: r[o++]
  14. };
  15. };
  16. }
  17. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  18. }
  19. export { _createForOfIteratorHelperLoose as default };