1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | const tslib_1 = require("tslib");
|
5 | const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
6 | const __1 = tslib_1.__importDefault(require(".."));
|
7 | function styledJSON(obj) {
|
8 | let json = JSON.stringify(obj, null, 2);
|
9 | if (!chalk_1.default.enabled) {
|
10 | __1.default.info(json);
|
11 | return;
|
12 | }
|
13 | let cardinal = require('cardinal');
|
14 | let theme = require('cardinal/themes/jq');
|
15 | __1.default.info(cardinal.highlight(json, { json: true, theme }));
|
16 | }
|
17 | exports.default = styledJSON;
|