indent-model
v3.0.0
Published
Configure your desired indentation model and put spaces with fixed tabsizes in between strings
Downloads
13
Readme
IndentModel
Configure an indentation model and put spaces with fixed tabsizes in between strings
const IndentModel = require("indent-model");
const IndentModel = require("indent-model");
const itemsToLog = [
"2020-08-06T00:00:00.000+0200",
"GET",
"/v1/some/api/endpoint",
"monkey",
1273457,
true,
false
];
//
const tabs4 = new IndentModel();
console.log(tabs4.tabify(...itemsToLog));
"2020-08-06T00:00:00.000+0200 GET /v1/some/api/endpoint monkey 1273457 true false"
//--,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,---,
//
const tabs6 = new IndentModel({ tabSize: 6, minDistance: 4 });
console.log(tabs6.tabify(...itemsToLog));
"2020-08-06T00:00:00.000+0200 GET /v1/some/api/endpoint monkey 1273457 true false"
//----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,-----,