pretty-log-2

1.0.0 • Public • Published

Pretty Log

Tiny modules that provides basic 'log' utility function which handles some basic logic for pretty printing objects in javascript

API

log

Log objects purely using the behavior found in console.log

var myObject = {
  name: 'Bob',
  age: 5
}
 
log(myObject)

Can also be used without any 'this' context so useful for callbacks

promiseFn()
  .then(doMore)
  .catch(log)

pp

'Pretty-print' a javascript object (also accepts primitives) for better readability.

var myObject = {
  name: 'Bob',
  age: 5
}
 
pp(myObject)

Readme

Keywords

Package Sidebar

Install

npm i pretty-log-2

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • stevekane