Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update src/index #1254

Merged
merged 5 commits into from
Dec 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading