You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
buffer_platform/node_modules/restore-cursor/index.js

16 lines
386 B

import process from 'node:process';
import onetime from 'onetime';
import {onExit} from 'signal-exit';
const terminal = process.stderr.isTTY
? process.stderr
: (process.stdout.isTTY ? process.stdout : undefined);
const restoreCursor = terminal ? onetime(() => {
onExit(() => {
terminal.write('\u001B[?25h');
}, {alwaysLast: true});
}) : () => {};
export default restoreCursor;