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

Function soulnode

test/common.js:4523–4538  ·  view source on GitHub ↗
(gun, kn, r)

Source from the content-addressed store, hash-verified

4521 });
4522
4523 function soulnode(gun, kn, r){ // TODO: WARNING! Key implementation has changed significantly. Tests are somewhat hardcoded, sad day.
4524 r = r || [];
4525 kn = Gun.obj.copy(kn);
4526 delete kn._;
4527 expect(Gun.obj.empty(kn, '##')).to.be.ok();
4528 kn = gun.back(-1)._.graph[Gun.val.link.is(kn['##'])];
4529 Gun.node.is(kn, function(node, s){
4530 var n = gun.back(-1)._.graph[s];
4531 if(Gun.obj.has(n, '##')){
4532 soulnode(gun, n, r);
4533 return;
4534 }
4535 r.push(s);
4536 });
4537 return r;
4538 }
4539
4540 it('get node put node merge', function(done){
4541 gun.get('hello/key', function(err, node){

Callers 1

common.jsFile · 0.85

Calls 1

expectFunction · 0.85

Tested by

no test coverage detected