Skip to content

Commit

Permalink
examples: fix colors printout
Browse files Browse the repository at this point in the history
Fixes #502.
  • Loading branch information
TooTallNate committed Sep 13, 2017
1 parent 8d76196 commit 7cd9e53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/browser/colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
debug.enable('*')

for (var i=0; i < debug.colors.length; i++) {
debug('example:' + i)('The color is %o', debug.colors[i])
const d = debug('example:' + i);
d('The color is %o', d.color);
}
</script>
<style type="text/css">
body {
padding-top: 100px;
text-align: center;
font-family: sans-serif;
}
</style>
</head>
Expand Down
3 changes: 2 additions & 1 deletion examples/node/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ var debug = require('../../')
debug.enable('*')

for (var i=0; i < debug.colors.length; i++) {
debug('example:' + i)('The color is %o', debug.colors[i])
const d = debug('example:' + i);
d('The color is %o', d.color);
}

0 comments on commit 7cd9e53

Please sign in to comment.