Skip to content

Commit

Permalink
debug.warn like console.log
Browse files Browse the repository at this point in the history
Allows to pass comma delimited messages to debug.warn
  • Loading branch information
tawez committed Jun 19, 2015
1 parent 2e7d558 commit 70dd4a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ define(
window.DEBUG = this;
},

warn: function (message) {
warn: function (/*messages*/) {
if (!window.console) { return; }
var fn = (console.warn || console.log);
fn.call(console, this.toString() + ': ' + message);
var messages = [].slice.call(arguments);
messages.unshift(this.toString() + ':')
fn.apply(console, messages);
},

registry: registry,
Expand Down

0 comments on commit 70dd4a3

Please sign in to comment.