Skip to content

vhf/log-anything

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log-anything

log-anything is a dead simple JS debug/logging utility

Usage

npm install log-anything

Then require it.

const l = require('log-anything');

const obj = { a: 1, b: 2, c: 3 };
// log displays values
l.log('obj is', obj, 'and this is an array:', [3, 2, 1]);
// obj is { a: 1, b: 2, c: 3 } and this is an array: [ 3, 2, 1 ]

var xs = [
  ['ops/sec', 'name', '(comment)'],
  [520.56, 'algo 1'],
  ['9.99', 'two', 'strange'],
  [10, 'third one'],
  ['nine thousand', 'NaN', 'fun!'],
];
// logt displays a table
l.logt(xs);
/*
ops/sec        name       (comment)
520.56         algo 1
  9.99         two        strange
 10            third one
nine thousand  NaN        fun!
*/

About

A dead simple JS debug/logging utility

Resources

Stars

Watchers

Forks

Packages

No packages published