1.0.3 • Published 3 years ago

elog-console v1.0.3

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

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' } }