Nathan Rajlich
6f278e3b4c
browser: place %c marker after the space character
...
This way, in Firefox 31, the "main content" of the debug
call will not have any extra whitespace on the left of it.
2014-07-15 15:55:52 -07:00
Nathan Rajlich
998d85bac9
browser: reset the "content" color via color: inherit
...
Necessary for Firefox v31, which seems to retain the previous
color from a previous %c color formatter when an empty string
is given.
2014-07-15 15:41:03 -07:00
Nathan Rajlich
165e937e6d
browser: add colors support for Firefox >= v31
...
Part of #116 .
2014-07-15 15:40:16 -07:00
Nathan Rajlich
2f70264aad
browser: fix lint
2014-06-16 17:24:54 -07:00
G Scott Olson
d738362777
Restore color order.
2014-06-10 17:17:41 -04:00
G Scott Olson
5f54356b6d
Update color palette.
2014-06-10 16:57:20 -04:00
Tim Oxley
dd32a4c902
Make console logging function configurable.
...
Split log() into 2 methods: formatArgs() and log(), allowing log to be
overridden on a per-namespace or global level. Global log settings trump
per-namespace settings.
2014-06-07 23:34:39 -07:00
Nathan Rajlich
c1b0c6e9cc
browser: use removeItem() to clear localStorage
2014-06-06 13:08:59 -07:00
David M. Lee
3aa365ae93
Don't set DEBUG if namespaces is undefined.
...
On Node.js, if you set a process.env field to either null or undefined,
it gets cast to string 'null' or 'undefined'.
For debug, this means that if you don't have DEBUG set, it will get set
to the string 'undefined'. There are other modules (like
node-rest-client) which use the DEBUG environment variable that will
start spewing debug output when you don't want it to.
2014-06-06 15:01:50 -05:00
Nathan Rajlich
872115d10a
make ms diff be global, not be scope
...
Closes #88 .
Closes #90 .
2014-06-02 11:36:49 -07:00
Nathan Rajlich
e502a7df95
*: export the colors array
...
DRYs up some of the logic in the process,
since the "core" color handling code gets
moved to `debug.js`
Closes #20 .
2014-06-01 10:32:30 -07:00
Nathan Rajlich
9b5e9f7ef2
browser: even more robust "%c" handling
...
Now we support the user passing in their own
"%c" fields in `debug()` calls.
2014-06-01 10:26:58 -07:00
Nathan Rajlich
32b0bf41eb
browser, node: rename c to color
...
More clear for the user to override it this way.
See: #95
2014-05-31 19:18:41 -07:00
Nathan Rajlich
84951941a8
browser: map "%j" to JSON.stringify()
2014-05-31 14:24:43 -07:00
Nathan Rajlich
0f61fca93f
browser: don't let "%%" throw off the color insertion index
2014-05-31 14:17:21 -07:00
Nathan Rajlich
a4aacbd785
browser: fix the case of passing additional arguments after the "format"
...
Before the "%c" CSS color value was potentially being
inserted into the wrong place in the arguments array,
which would throw the formatting off in the Console.
2014-05-31 12:55:05 -07:00
Nathan Rajlich
eb80377e34
browser: fix colors in strict mode
2014-05-31 12:25:14 -07:00
Nathan Rajlich
8bed009c84
browser: add Firebug color support
2014-05-31 11:16:12 -07:00
Nathan Rajlich
79b75ad626
browser: add colors for WebKit browsers
...
Based off of the implemention from #67 , except this one
matches the Node.js colored output exactly, including the
trailing `diff` value.
2014-05-30 22:48:44 -07:00
Nathan Rajlich
3314c7761c
browser: don't default save() to empty string
2014-05-30 22:13:23 -07:00
Nathan Rajlich
bea76f587b
browser: fix undefined name variable
2014-05-30 00:29:14 -07:00
Nathan Rajlich
3eebad470a
browser: fix comment typo
2014-05-30 00:23:56 -07:00
Nathan Rajlich
d05b468ee2
browser: , -> .
2014-05-30 00:18:08 -07:00
Nathan Rajlich
2cffe24185
rewrite: abstract common logic for Node & browsers
2014-05-30 00:10:10 -07:00