12 lines
263 B
JavaScript
12 lines
263 B
JavaScript
|
import process from 'node:process';
|
||
|
import onetime from 'onetime';
|
||
|
import signalExit from 'signal-exit';
|
||
|
|
||
|
const restoreCursor = onetime(() => {
|
||
|
signalExit(() => {
|
||
|
process.stderr.write('\u001B[?25h');
|
||
|
}, {alwaysLast: true});
|
||
|
});
|
||
|
|
||
|
export default restoreCursor;
|