0.1.2 • Published 7 years ago
@eropple/is-logger v0.1.2
@eropple/is-logger
I like using Bunyan as a logger. But I also like making my tools available to people who don't. (Even though they should be using Bunyan. Y'all, just use Bunyan!)
To that end, I needed a utility library that does two things:
isLogger(obj): is this a logger? Defined loosely as "does it have the same output methods asconsolehas?".isBunyan(obj): is this a Bunyan logger? Defined similarly loosely as "does it passisLogger(obj)and also havechild,fatal, andstreams(some of the most important methods on a Bunyan logger).