-
Notifications
You must be signed in to change notification settings - Fork 940
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Node:
%O
(big O) pretty-prints the object (#322)
* %O (big O) pretty-prints the object For example: ```js var debug = require('./')('foo') var o = { foo: 'bar', b: new Buffer(10), c: Math.PI } debug('%O', o) ``` Previously: ``` foo { foo: 'bar', b: <Buffer 01 00 00 00 01 00 00 00 c0 82>, c: 3.141592653589793 } +0ms ``` Now: ``` foo { foo: 'bar', foo b: <Buffer 01 00 00 00 01 00 00 00 c0 82>, foo c: 3.141592653589793 } +0ms ``` This is a breaking change for anybody relying on the old `%O` behavior. Though I don't think `%O` was working previously because the formatters regexp wasn't checking for uppercase formatters (now fixed in this patch). * use %O by default if no formatting string is given * Readme: add Formatters section Fixes #302. * Readme: finish custom formatters example
- Loading branch information
1 parent
bd9faa1
commit 00f3046
Showing
3 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters