Kaikō
A logging runtime for JavaScript
import * as log from "@dashkite/kaiko"
foo = (bar) ->
log.push "foo"
log.info bar
# do something ...
log.warn "uh-oh"
# do some other things ...
log.pop "foo"
Later, you can write the log as rich JSON (meaning the objects JSON normally ignores are converted into values it can serialize for reference purposes):
log.write process.stdout
From there, you can pipe the output to a tool like fx.
npm test | fx
Or, if you’re in the browser, just access the JSON:
log.toJSON()
Installation
npm i @dashkite/kaiko