update socials section
This commit is contained in:
39
node_modules/cli-cursor/index.js
generated
vendored
Normal file
39
node_modules/cli-cursor/index.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
import process from 'node:process';
|
||||
import restoreCursor from 'restore-cursor';
|
||||
|
||||
let isHidden = false;
|
||||
|
||||
const cliCursor = {};
|
||||
|
||||
cliCursor.show = (writableStream = process.stderr) => {
|
||||
if (!writableStream.isTTY) {
|
||||
return;
|
||||
}
|
||||
|
||||
isHidden = false;
|
||||
writableStream.write('\u001B[?25h');
|
||||
};
|
||||
|
||||
cliCursor.hide = (writableStream = process.stderr) => {
|
||||
if (!writableStream.isTTY) {
|
||||
return;
|
||||
}
|
||||
|
||||
restoreCursor();
|
||||
isHidden = true;
|
||||
writableStream.write('\u001B[?25l');
|
||||
};
|
||||
|
||||
cliCursor.toggle = (force, writableStream) => {
|
||||
if (force !== undefined) {
|
||||
isHidden = force;
|
||||
}
|
||||
|
||||
if (isHidden) {
|
||||
cliCursor.show(writableStream);
|
||||
} else {
|
||||
cliCursor.hide(writableStream);
|
||||
}
|
||||
};
|
||||
|
||||
export default cliCursor;
|
Reference in New Issue
Block a user