Skip to content

Commit 7cd9e53

Browse files
committed
examples: fix colors printout
Fixes #502.
1 parent 8d76196 commit 7cd9e53

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/browser/colors.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
debug.enable('*')
99

1010
for (var i=0; i < debug.colors.length; i++) {
11-
debug('example:' + i)('The color is %o', debug.colors[i])
11+
const d = debug('example:' + i);
12+
d('The color is %o', d.color);
1213
}
1314
</script>
1415
<style type="text/css">
1516
body {
1617
padding-top: 100px;
1718
text-align: center;
19+
font-family: sans-serif;
1820
}
1921
</style>
2022
</head>

examples/node/colors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ var debug = require('../../')
33
debug.enable('*')
44

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

0 commit comments

Comments
 (0)