mirror of
https://github.com/JasonYANG170/IOTConnect-Web.git
synced 2024-11-24 04:36:31 +00:00
19 lines
766 B
JavaScript
19 lines
766 B
JavaScript
|
import unsupportedIterableToArray from "./unsupportedIterableToArray.js";
|
||
|
export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
||
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
||
|
if (it) return (it = it.call(o)).next.bind(it);
|
||
|
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
||
|
if (it) o = it;
|
||
|
var i = 0;
|
||
|
return function () {
|
||
|
if (i >= o.length) return {
|
||
|
done: true
|
||
|
};
|
||
|
return {
|
||
|
done: false,
|
||
|
value: o[i++]
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
|
}
|