mirror of
https://github.com/amark/gun.git
synced 2025-07-03 19:32:32 +00:00
Merge pull request #119 from PsychoLlama/master
Allow .val to accept string arguments for logging
This commit is contained in:
commit
48f971555a
4
gun.js
4
gun.js
@ -514,8 +514,8 @@
|
|||||||
gun.__.on(Gun.is.soul.on(data) + '.end').emit(data);
|
gun.__.on(Gun.is.soul.on(data) + '.end').emit(data);
|
||||||
});
|
});
|
||||||
return function(cb, opt){
|
return function(cb, opt){
|
||||||
var gun = this, ctx = {};
|
var gun = this, ctx = {}, args = Array.prototype.slice.call(arguments);
|
||||||
cb = cb || function(val, field){ root.console.log(field + ':', val) }
|
cb = Gun.fns.is(cb)? cb : function(val, field){ root.console.log.apply(root.console, args.concat([field && (field += ':'), val])) }
|
||||||
opt = opt || {};
|
opt = opt || {};
|
||||||
|
|
||||||
gun.on(function($, delta, on){
|
gun.on(function($, delta, on){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user