1.0.4 • Published 2 years ago
nodejs-clg v1.0.4
nodejs-clg
Node.js Console.log
CommonJS version
A console log is show in block line width start and end, you see:
data file URL and name
Check data type
Check type if data is array
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