cryptalk/client/source/debug.js

15 lines
359 B
JavaScript
Raw Permalink Normal View History

2021-11-03 15:35:57 -04:00
export default function (mediator, debug) {
if (debug) {
mediator.on('*', function (data, done, name) {
if (name !== 'console:post' && name !== 'notification:send') {
mediator.emit('console:post', {
type: 'server',
data: name + (data ? '(' + JSON.stringify(data) + ')' : ''),
debug: 1
});
}
done();
});
}
}