UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

27 lines (22 loc) 428 B
'use strict'; var restoreCursor = require('restore-cursor'); var hidden = false; exports.show = function () { hidden = false; process.stdout.write('\u001b[?25h'); }; exports.hide = function () { restoreCursor(); hidden = true; process.stdout.write('\u001b[?25l'); }; exports.toggle = function (force) { if (force !== undefined) { hidden = force; } if (hidden) { exports.show(); } else { exports.hide(); } };