Miss any of our Open RFC calls?Watch the recordings here! »

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)

Install

npm i pretty-log-2

DownloadsWeekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar