diff --git a/examples/browser/colors.html b/examples/browser/colors.html index 5d023bb2..ce969072 100644 --- a/examples/browser/colors.html +++ b/examples/browser/colors.html @@ -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); } diff --git a/examples/node/colors.js b/examples/node/colors.js index bcc52d94..c144ee4e 100644 --- a/examples/node/colors.js +++ b/examples/node/colors.js @@ -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); }