Skip to content

v0.1.0

Compare
Choose a tag to compare
@StreetStrider StreetStrider released this 15 Mar 17:31
· 205 commits to master since this release

First release with Console object concept.

What's:

  • console's .log, .info, .warn, .error all compatible with Node' ones. Colors is used for .info, .warn, .error. In next releases coloring will be controlled by option flags.
  • console.dir compatible with Node's one. It's also supports extra flags, like:
console.dir(object, 5);
// where number 5 is `depth` → { depth: 5 }

console.dir(object, 'showHidden', 1, 'colors');
// for turning hidden attributes display, with depth = 1 and colors enabled
// → { showHidden: true, depth: 1, colors: true }
  • Console constructor works like Node's one, by passing streams, streams are optional and defaults to process [ stdout, stderr ] pair. Console is UC, i.e. universal constructor and can be invoked as simple function, without new keyword.