From f748ef0308bbbce06a1871bd7e25d51b9c79fccd Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Tue, 27 Sep 2016 11:40:20 -0700 Subject: [PATCH] add set back in for @stefdv --- gun.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gun.js b/gun.js index 11e41338..848e8968 100644 --- a/gun.js +++ b/gun.js @@ -2008,6 +2008,18 @@ return this.Back(-1).put(Gun.node.ify({}, this._.get), null, this._.get); } }()); + + ;(function(){ + Gun.chain.set = function(item, cb, opt){ + var gun = this; + cb = cb || function(){}; + return item.val(function(node){ + var put = {}, soul = Gun.node.soul(node); + if(!soul){ return cb.call(gun, {err: Gun.log('Only a node can be linked! Not "' + node + '"!')}) } + gun.put(Gun.obj.put(put, soul, Gun.val.rel.ify(soul)), cb, opt); + }); + } + }()); })(require, './src/api'); }());