1.0.1 • Published 7 years ago

collog-type v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Collog-type

Function that logs its arguments in different colors based on their data type.

/* Strings: yellow text,
  Numbers, NaN: cyan text,
  undefined: cyan background, bold white text,
  null: magenta background, bold white text,
  true: green background, bold white text
  false: red background, bold white text
  Arrays: cyan text, JSON pretty format
  Objects: green text, JSON pretty format
  Functions: purple text
*/

Installation

npm install collog-type

Usage

const collog = require('collog-type')

// or whatever
function f () {
  console.log('Foo')
}

// call the function
collog(f, 123, 'text', { a: 1 }, undefined, [ 1, 2, 3 ])

Sample

alt text

Testing

Navigate to node_modules\collog-type in your project folder, and run

npm test

Change log

10/02/2018: The package was republished on my new npm account

Release Notes

  • 1.0.1 Republished version
  • 1.0.0 Initial release

License

MIT

1.0.1

7 years ago

1.0.0

7 years ago