MCPcopy Create free account
hub / github.com/Nynxz/ComfyUI-IdeogramHelper / iterator

Function iterator

web/main.js:973–987  ·  view source on GitHub ↗
(self2, method, wrapValue)

Source from the content-addressed store, hash-verified

971 }
972};
973function iterator(self2, method, wrapValue) {
974 const arr = shallowReadArray(self2);
975 const iter = arr[method]();
976 if (arr !== self2 && !/* @__PURE__ */ isShallow(self2)) {
977 iter._next = iter.next;
978 iter.next = () => {
979 const result = iter._next();
980 if (!result.done) {
981 result.value = wrapValue(result.value);
982 }
983 return result;
984 };
985 }
986 return iter;
987}
988const arrayProto = Array.prototype;
989function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
990 const arr = shallowReadArray(self2);

Callers 3

[Symbol.iterator]Function · 0.85
entriesFunction · 0.85
valuesFunction · 0.85

Calls 2

shallowReadArrayFunction · 0.85
isShallowFunction · 0.85

Tested by

no test coverage detected