1.0.8 • Published 3 years ago

crude-dev-tools v1.0.8

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

logo

CrudeDevTools is a minimalistic interface library for console applications. It contains

  • A boxifyer
  • A text ANSI formatter (*colors, bold)
  • An ANSI purifier
  • A object pretty-printer

Setup

$ npm install crude-dev-tools

A boxifyer

screenshot: boxifier

const { boxify, fmtStr } = require("crude-dev-tools");

const str = `
Hello world!
This is a box.
    `;

// un-colored
console.log(boxify(str));

// blue colored
console.log(fmtStr(boxify(str), "blue"));

A object pretty-printer

screenshot: object pretty-printer

const { logObj } = require("crude-dev-tools");

const obj = {
  a: {
    b: 123,
    c: "Hello, world!",
    d: [1, 2, 3],
    e: {
      f: true,
    },
  },
};

console.log(logObj(obj));

// without colors: console.log(logObj, false));
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago