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

Function f

test/common.js:507–521  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

505 var i = 0;
506 function flow(){
507 var f = function(arg){
508 var cb = f.cb? f.cb.fn : f.fn;
509 if(cb){
510 f.cb = cb;
511 var ff = flow();
512 ff.f = f;
513 cb(ff);
514 return;
515 }
516 if(f.f){
517 f.f(arg);
518 f.cb = 0;
519 return;
520 }
521 }, cb;
522 f.flow = function(fn){
523 cb = (cb || f).fn = fn;
524 return f;

Callers 1

common.jsFile · 0.70

Calls 2

flowFunction · 0.70
cbFunction · 0.70

Tested by

no test coverage detected