Skip to content

Gracefully restore the CLI cursor on exit

License

Notifications You must be signed in to change notification settings

sindresorhus/restore-cursor

Repository files navigation

restore-cursor

Gracefully restore the CLI cursor on exit

Prevent the cursor you have hidden interactively from remaining hidden if the process crashes.

It does nothing if run in a non-TTY context.

Install

npm install restore-cursor

Usage

import restoreCursor from 'restore-cursor';

restoreCursor();