Print colorful dots to show progress and status of asynchronously completing events
Start and completion of a task will show a dot on the console. The color of the dot can be customized according to the state of the event when the task ends.
This can useful for brief reporting on async requests:
var DotReporter = require'dot-reporter'DotReporterdot = /* optional state to color mappings */;// Start a taskdottaskStart'taskID';makeARequest// ... Time passes before we get to here ...dottaskEnd'taskID' dataendState;;
The default state map is:
start: 'white'end: 'green'err: 'red'bad: 'purple'
The initial event state must always be called
npm test to see an example.