var _getIterator = require("../core-js/get-iterator"); var _Array$isArray = require("../core-js/array/is-array"); var _getIteratorMethod = require("../core-js/get-iterator-method"); var _Symbol = require("../core-js/symbol"); var unsupportedIterableToArray = require("./unsupportedIterableToArray"); function _createForOfIteratorHelper(o) { if (typeof _Symbol === "undefined" || _getIteratorMethod(o) == null) { if (_Array$isArray(o) || (o = unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = _getIterator(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } module.exports = _createForOfIteratorHelper;