MCPcopy
hub / github.com/cujojs/when / _resolver

Function _resolver

test/map-test.js:125–137  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

123 );
124
125 function _resolver(id) {
126 return when.promise(function(resolve, reject, notify) {
127 var loop = 0;
128 var timer = setInterval(function () {
129 notify(id);
130 loop++;
131 if (loop === 2) {
132 clearInterval(timer);
133 resolve(id);
134 }
135 }, 1);
136 });
137 }
138 }
139});

Callers 1

map-test.jsFile · 0.85

Calls 2

notifyFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…