UNPKG

@beenotung/tslib

Version:
20 lines (19 loc) 441 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.catchMain = catchMain; exports.eraseChars = eraseChars; function catchMain(p) { p.catch(e => { console.error(e); process.exit(1); }); } function eraseChars(writeStream, n) { if (n < 1) { return; } writeStream.write(' '.repeat(n)); if (writeStream.moveCursor) { writeStream.moveCursor(-n, 0); } }