MCPcopy Index your code
hub / github.com/nodejs/node / _createForOfIteratorHelperLoose

Function _createForOfIteratorHelperLoose

test/fixtures/snapshot/marked.js:51–70  ·  view source on GitHub ↗
(o, allowArrayLike)

Source from the content-addressed store, hash-verified

49 }
50
51 function _createForOfIteratorHelperLoose(o, allowArrayLike) {
52 var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
53 if (it) return (it = it.call(o)).next.bind(it);
54
55 if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
56 if (it) o = it;
57 var i = 0;
58 return function () {
59 if (i >= o.length) return {
60 done: true
61 };
62 return {
63 done: false,
64 value: o[i++]
65 };
66 };
67 }
68
69 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
70 }
71
72 var defaults$5 = {exports: {}};
73

Callers 2

_loop3Function · 0.85
marked.jsFile · 0.85

Calls 3

bindMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…