diff --git a/example.js b/examples/index.js similarity index 100% rename from example.js rename to examples/index.js diff --git a/examples/levels.js b/examples/levels.js new file mode 100644 index 0000000..e625a43 --- /dev/null +++ b/examples/levels.js @@ -0,0 +1,26 @@ +'use strict' + +var Acho = require('..') +var acho = Acho({ + upperCase: true +}) + +var levels = Object.keys(acho.types) + +var fixtureObj = { + foo: 'bar', + hello: 'world' +} + +var fixtureArr = [1, 2, 3, 4, 5] + +acho.debug('%j', fixtureObj) +acho.debug(fixtureObj) +acho.debug(fixtureArr) + +levels.forEach(function (level) { + setInterval(function () { + acho[level]('This is a auto-generated ' + level + ' message') + acho[level](fixtureObj) + }, 1000) +})