npm.io
1.0.3 • Published 5 years ago

elog-console

Licence
ISC
Version
1.0.3
Deps
0
Size
7 kB
Vulns
0
Weekly
0

Index

Project

About

A simple console with information about the calling function line and file name.

Technology used

  • Javascript
Install

npm i elog-console --save--dev
Usage
import {eLog} from "elog-console"

eLog(label, value, options)
The function accepts 3 parameters: label, value, options.
  • label String : text to name the console.

  • value any : value to display on console

  • options ? Boolean | Object : { depth: Boolean, color: String }

    'depth' -> if 'true' 'console.log()' otherwise node 'util.inspect',
    'color' -> color name ( default: { depth: false, color: 'magenta' })

Examples
// use without the options parameter
const user = {
  uuid:'gwfer12dert',
  name:'elprosystem'
}

eLog('user' ,user);

// output
line: 100  file: elog-console/index.js function: eLog  label: user
{ user: { uuid:'gwfer12dert', name:'elprosystem' } }

Keywords