1.0.4 • Published 2 years ago

nodejs-clg v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

nodejs-clg

Node.js Console.log

CommonJS version

A console log is show in block line width start and end, you see:

  1. data file URL and name

  1. Check data type

  1. Check type if data is array

  1. show data width console.dir method

Install

Install via npm

npm i -D nodejs-clg

Usage

const { isDevelopMode, logger } =  require("logger.js");

isDevelopMode(true);

const foo = [{name:  'foo',age:  32, active:  true}]

logger(foo)

isDevMode === true

--------------------- Start log ------------------------------
 
- Type is:  object
- Is this an Array? Yes
- Array Length:  1
- Data return: 
[ { name: 'foo', age: 32, active: true } ]
 
---------------------  End log  ------------------------------

isDevMode === false

Sorry we are in production mode..

License

MIT