mirror of
https://github.com/amark/gun.git
synced 2025-05-19 13:26:48 +00:00

* change stats.radata * remove stats.radata file creation since fs.writeFil will do it any way * require path and use last directory of opt file path or use radata * make unset change
12 lines
350 B
JavaScript
12 lines
350 B
JavaScript
var Gun = (typeof window !== "undefined")? window.Gun : require('../gun');
|
|
|
|
const rel_ = '#'; // '#'
|
|
const 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;
|
|
}
|