mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00

later with @bmatusiak check sea.then for '../gun.js' vs '../' vs ... note: src/index -> core.js TODO: something about WebRTC candidates hitting ack decrement limits?
11 lines
312 B
JavaScript
11 lines
312 B
JavaScript
;(function(){
|
|
|
|
var u, Gun = (''+u != typeof GUN)? (GUN||{chain:{}}) : require((''+u === typeof MODULE?'.':'')+'./gun', 1);
|
|
Gun.chain.then = function(cb, opt){
|
|
var gun = this, p = (new Promise(function(res, rej){
|
|
gun.once(res, opt);
|
|
}));
|
|
return cb? p.then(cb) : p;
|
|
}
|
|
|
|
}()); |