0.0.2 • Published 4 years ago

@kenjox/dev-utils v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Super simple logger

Usage

Printing an object

const { dd } = require('@kenjox/dev-utils');

const obj = { a: 'b', c: { d: { e: { f: 'g' } } } };

dd(obj);

// Output
{
  "a": "b",
  "c": {
    "d": {
      "e": {
        "f": "g"
      }
    }
  }
}

Printing an array in a table

const { ddt } = require('@kenjox/dev-utils');

const array = ["Cat", "Dog", "Elephant"];

ddt(array);

// Output
┌─────────┬────────────┐
│ (index) │   Values   │
├─────────┼────────────┤
│    0    │   'Cat'    │
│    1    │   'Dog'    │
│    2    │ 'Elephant' │
└─────────┴────────────┘