MCPcopy
hub / github.com/amark/gun / fn

Function fn

test/old/tmp.js:25–35  ·  view source on GitHub ↗
(cb)

Source from the content-addressed store, hash-verified

23 return;
24 function Next(){
25 var fn = function(cb){
26 if(!fn.stack || !fn.stack.length){
27 setImmediate(function next(n){
28 return (n = (fn.stack||[]).shift() || function(){}), n.back = fn.stack, fn.stack = [], n(function(){
29 return (fn.stack = (fn.stack||[]).concat(n.back)), next();
30 });
31 });
32 } if(cb){
33 (fn.stack = fn.stack || []).push(cb);
34 } return fn;
35 }, setImmediate = setImmediate || function(cb){return setTimeout(cb,0)}
36 return fn;
37 }
38

Callers 9

perfFunction · 0.70
mocha.jsFile · 0.50
doneFunction · 0.50
HTMLCovFunction · 0.50
nextFunction · 0.50
hookErrFunction · 0.50
withStackFunction · 0.50
growlFunction · 0.50
expect.jsFile · 0.50

Calls 2

nFunction · 0.50
nextFunction · 0.50

Tested by

no test coverage detected