UNPKG

@remotex-labs/xansi

Version:

A lightweight ANSI utility library for styling terminal output

3 lines (2 loc) 476 B
function e(r){process.stdout.write?process.stdout.write(r):console.log(r)}function o(r,t=0){return`\x1B[${r};${t}H`}function s(r){return r.replace(/\x1b\[[0-9;]*m/g,"")}var n={CLEAR_LINE:"\x1B[K",HIDE_CURSOR:"\x1B[?25l",SHOW_CURSOR:"\x1B[?25h",SAVE_CURSOR:"\x1B[s",CLEAR_SCREEN:"\x1B[2J\x1B[H",RESTORE_CURSOR:"\x1B[u",CLEAR_SCREEN_DOWN:"\x1B[J",RESET_TERMINAL:"\x1Bc"};export{n as ANSI,o as moveCursor,s as stripAnsi,e as writeRaw}; //# sourceMappingURL=ansi.component.js.map