forked from enviPath/enviPy
Current Dev State
This commit is contained in:
26
static/js/ketcher2/node_modules/cli-cursor/index.js
generated
vendored
Normal file
26
static/js/ketcher2/node_modules/cli-cursor/index.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
'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();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user