amark / gun

An open source cybersecurity protocol for syncing decentralized graph data.
https://gun.eco/docs
Other
17.93k stars 1.16k forks source link

Loading fix #1356

Closed bmatusiak closed 5 months ago

bmatusiak commented 5 months ago

i use nwjs.. this is a mix of browser+nodejs

this PR fixes some loading of gun for that.

introducing a new look to exporting plugin modules that looks like this.

(function(name, exports){
  if(typeof window !== "undefined"){
    window[name] = window[name]||exports;
  } 
  try{ module.exports = exports }catch(e){}
})("Radix",Radix);
amark commented 5 months ago

sexy!