Skip to content

Commit

Permalink
update src/index (#1254)
Browse files Browse the repository at this point in the history
* update src/index

* update

* src/index fix

* added src/core
  • Loading branch information
bmatusiak authored Dec 15, 2023
1 parent 6dfaaf2 commit c440a7c
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions gun.js
Original file line number Diff line number Diff line change
Expand Up @@ -1167,10 +1167,28 @@
USE('./put');
USE('./get');
module.exports = Gun;
})(USE, './core');

;USE(function(module){
var Gun = USE('./root');
USE('./shim');
USE('./onto');
USE('./valid');
USE('./state');
USE('./dup');
USE('./ask');
USE('./core');
USE('./on');
USE('./map');
USE('./set');
USE('./mesh');
USE('./websocket');
USE('./localStorage');
module.exports = Gun;
})(USE, './index');

;USE(function(module){
var Gun = USE('./index');
var Gun = USE('./root');
Gun.chain.on = function(tag, arg, eas, as){ // don't rewrite!
var gun = this, cat = gun._, root = cat.root, act, off, id, tmp;
if(typeof tag === 'string'){
Expand Down Expand Up @@ -1306,7 +1324,7 @@
})(USE, './on');

;USE(function(module){
var Gun = USE('./index'), next = Gun.chain.get.next;
var Gun = USE('./root'), next = Gun.chain.get.next;
Gun.chain.get.next = function(gun, lex){ var tmp;
if(!Object.plain(lex)){ return (next||noop)(gun, lex) }
if(tmp = ((tmp = lex['#'])||'')['='] || tmp){ return gun.get(tmp) }
Expand Down Expand Up @@ -1351,7 +1369,7 @@
})(USE, './map');

;USE(function(module){
var Gun = USE('./index');
var Gun = USE('./root');
Gun.chain.set = function(item, cb, opt){
var gun = this, root = gun.back(-1), soul, tmp;
cb = cb || function(){};
Expand Down Expand Up @@ -1728,7 +1746,7 @@
})(USE, './mesh');

;USE(function(module){
var Gun = USE('./index');
var Gun = USE('./root');
Gun.Mesh = USE('./mesh');

// TODO: resync upon reconnect online/offline
Expand Down

0 comments on commit c440a7c

Please sign in to comment.