mirror of
https://github.com/amark/gun.git
synced 2026-03-04 16:25:25 +00:00
Hmm. Before G U N chains?
This commit is contained in:
17
gun.js
17
gun.js
@@ -862,9 +862,24 @@
|
||||
};
|
||||
}());
|
||||
;(function(){
|
||||
function key(err, node){ // TODO: Belongs someplace else!
|
||||
var at = this;
|
||||
var pseudo = is_node_ify({}, is_node_soul(node));
|
||||
console.log("--------------------------------------------------")
|
||||
is_node(node, function(n, f){
|
||||
n = at.gun.__.graph[f];
|
||||
console.log("oh", n);
|
||||
is_node(n, function(v, f){
|
||||
console.log(v, f, is_node_state(n, f));
|
||||
is_node_state_ify(pseudo, {field: f, value: v, state: is_node_state(n, f) })
|
||||
});
|
||||
});
|
||||
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", pseudo, "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
|
||||
}
|
||||
function got(err, node){
|
||||
var at = this;// opt = at.opt, cb;
|
||||
at.on('any', [err, node]);
|
||||
key.call(at, err, node);
|
||||
at.on('any', [err, at.node]);
|
||||
at.on('chain', at);
|
||||
}
|
||||
function cache(by, soul, back){
|
||||
|
||||
@@ -1471,12 +1471,12 @@ describe('Gun', function(){
|
||||
});
|
||||
|
||||
it('put node key get', function(done){
|
||||
Gun.log.debug = 1; console.log("-----------------------");
|
||||
Gun.log.debug = 1; window.gun = gun; console.log("-----------------------");
|
||||
gun.put({hello: "key"}).key('yes/key', function(err, ok){
|
||||
console.log("****************************", err, ok);
|
||||
expect(err).to.not.be.ok();
|
||||
done.w = 1; if(done.c){ return } if(done.r){ done(); done.c = 1 };
|
||||
}); return; gun.get('yes/key', function(err, node){ // CHANGELOG: API 0.3 BREAKING CHANGE FROM err, graph
|
||||
}).get('yes/key', function(err, node){ // CHANGELOG: API 0.3 BREAKING CHANGE FROM err, graph
|
||||
console.log("2 ****************************", err, node);
|
||||
console.log('oye', err, node);
|
||||
expect(err).to.not.be.ok();
|
||||
|
||||
Reference in New Issue
Block a user