logcl
A simple node package with a set of wrapper functions to console.log()
- cl - console.log or new line
- clt - console.log title
- cli - console.log indent (2 spaces)
- cll - console.log with label and data. data is indented 2 spaces
- cld - console.log with dashes before and after label
Install
$ npm install logcl --save
Use
Create a reference to the module in code. Then invoke the methods as needed.
code:
var log = ; var foo = "foo";var bar = "bar"; log;log; log;log;log; log;log;
output:
$ test1$$ My Title$ data$$ ---------- next test$ foo$ bar
Examples
cl - console.log or new line
code:
var data = 'hello world';log;log;
output:
// output$$ hello world
clt - console.log with title
cli - console.log with 2 space indent
code:
var title = 'An Object';var data = name: 'my object' ; log;log;
output:
$ An Object$
cld - console.log with with dashes before label
cll - console.log with label and data. data is indented 2 spaces
code:
var section = "New Section";var myNum = 42;var myArr = 123; loglog;log;
output:
$ ---------- New Section$ Number$ 42$ Array$ [1, 2, 3]