1.0.8 • Published 3 years ago
crude-dev-tools v1.0.8
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
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
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));