mirror of
https://github.com/amark/gun.git
synced 2025-06-23 22:42:32 +00:00
Merge branch 'master' of https://github.com/amark/gun
This commit is contained in:
commit
bc688a4e7f
@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
GUN is a realtime, distributed, offline-first, graph database engine. Lightweight and powerful, at just **~9KB** gzipped.
|
GUN is a realtime, distributed, offline-first, graph database engine. Lightweight and powerful, at just **~9KB** gzipped.
|
||||||
|
|
||||||
|
|
||||||
|
[](https://youtu.be/-i-11T5ZI9o)
|
||||||
|
|
||||||
## Why?
|
## Why?
|
||||||
|
|
||||||
- **Realtime** - It may be trivial to get realtime updates with socket.io or something, but what you do not get is *state synchronization*. GUN does this for you out of the box, assuring that two users' simultaneous updates won't concurrently break each other.
|
- **Realtime** - It may be trivial to get realtime updates with socket.io or something, but what you do not get is *state synchronization*. GUN does this for you out of the box, assuring that two users' simultaneous updates won't concurrently break each other.
|
||||||
|
6
gun.js
6
gun.js
@ -1132,7 +1132,7 @@
|
|||||||
};
|
};
|
||||||
console.debug = function(i, s){ return (Gun.log.debug && i === Gun.log.debug && Gun.log.debug++) && root.console.log.apply(root.console, arguments), s };
|
console.debug = function(i, s){ return (Gun.log.debug && i === Gun.log.debug && Gun.log.debug++) && root.console.log.apply(root.console, arguments), s };
|
||||||
Gun.log.count = function(s){ return Gun.log.count[s] = Gun.log.count[s] || 0, Gun.log.count[s]++ }
|
Gun.log.count = function(s){ return Gun.log.count[s] = Gun.log.count[s] || 0, Gun.log.count[s]++ }
|
||||||
}());
|
}.bind(this || module)());
|
||||||
|
|
||||||
|
|
||||||
;(function(Tab){
|
;(function(Tab){
|
||||||
@ -1147,7 +1147,7 @@
|
|||||||
s.del = function(key){ return store.removeItem(key) }
|
s.del = function(key){ return store.removeItem(key) }
|
||||||
var store = this.localStorage || {setItem: function(){}, removeItem: function(){}, getItem: function(){}};
|
var store = this.localStorage || {setItem: function(){}, removeItem: function(){}, getItem: function(){}};
|
||||||
exports.store = s;
|
exports.store = s;
|
||||||
}(Tab));
|
}.bind(this || module)(Tab));
|
||||||
|
|
||||||
Gun.on('opt').event(function(gun, opt){
|
Gun.on('opt').event(function(gun, opt){
|
||||||
opt = opt || {};
|
opt = opt || {};
|
||||||
@ -1432,4 +1432,4 @@
|
|||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}());
|
}());
|
||||||
}({}));
|
}.bind(this || module)({}));
|
Loading…
x
Reference in New Issue
Block a user