mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Take string arguments into .val()
, prepending your arguments to the console output. Good for debugging. Closes #118
This commit is contained in:
parent
c3961688bf
commit
ba6e99f301
4
gun.js
4
gun.js
@ -514,8 +514,8 @@
|
||||
gun.__.on(Gun.is.soul.on(data) + '.end').emit(data);
|
||||
});
|
||||
return function(cb, opt){
|
||||
var gun = this, ctx = {};
|
||||
cb = cb || function(val, field){ root.console.log(field + ':', val) }
|
||||
var gun = this, ctx = {}, args = Array.prototype.slice.call(arguments);
|
||||
cb = Gun.fns.is(cb)? cb : function(val, field){ root.console.log.apply(root.console, args.concat([field && (field += ':'), val])) }
|
||||
opt = opt || {};
|
||||
|
||||
gun.on(function($, delta, on){
|
||||
|
Loading…
x
Reference in New Issue
Block a user