mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
11 lines
364 B
JavaScript
11 lines
364 B
JavaScript
var Gun = (typeof window !== "undefined")? window.Gun : require('../gun');
|
|
|
|
const rel_ = Gun.val.link._; // '#'
|
|
const node_ = Gun.node._; // '_'
|
|
|
|
Gun.chain.unset = function(node){
|
|
if( this && node && node[node_] && node[node_].put && node[node_].put[node_] && node[node_].put[node_][rel_] )
|
|
this.put( { [node[node_].put[node_][rel_]]:null} );
|
|
return this;
|
|
}
|