UNPKG

code-story

Version:

Get your code activity log for standup from git

22 lines (21 loc) 635 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var chalk_1 = require("chalk"); var constants_1 = require("src/constants"); /** * Get indent in TABS by count */ var getIndent = function (count) { if (count === void 0) { count = 0; } var indent = ''; for (var i = 0; i < count; i++) { indent += constants_1.TAB; } return indent; }; var render = function (text, params) { if (params === void 0) { params = {}; } var _a = params.chalk, chalk = _a === void 0 ? chalk_1.white : _a; console.log(chalk("" + getIndent(params.indent) + text)); }; exports.default = render;