moonlifedb
Version:
A JSON database with a bunch of tools and typescript support.
23 lines (22 loc) • 743 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JSONFormatter = void 0;
class JSONFormatter {
whitespace;
/**
* JSONFormatter constructor
* Use this as constructor for tabulation and lines.
* @param options
* @param whitespace number, "tab" or "\t". Number means how much spaces to use after. "tab" is tabulation.
*/
constructor(options) {
if (options) {
options.whitespace != undefined
? this.whitespace = options.whitespace == 'tab' ? '\t' : options.whitespace
: this.whitespace = '\t';
}
else
this.whitespace = '\t';
}
}
exports.JSONFormatter = JSONFormatter;