UNPKG

ts-to-html

Version:

TS and SASS compiler for a HTML with live preview

28 lines (27 loc) 808 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clearAndLog = exports.clear = exports.log = void 0; const colors_1 = require("colors"); /** * Works like a classic console.log, but in this case if a custom color is applied to the console, * the color must be reset to the initial value. */ const log = (...args) => console.log(...args, (0, colors_1.reset)("")); exports.log = log; /** * Worls like `console.clear` function but the only function that works in this context. */ const clear = () => process.stdout.write('\x1Bc'); exports.clear = clear; /** * Same as ```js clear(); // followed by log(); ``` */ const clearAndLog = (...args) => { (0, exports.clear)(); (0, exports.log)(...args); }; exports.clearAndLog = clearAndLog;