Socket
Socket
Sign inDemoInstall

restore-cursor

Package Overview
Dependencies
3
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    restore-cursor

Gracefully restore the CLI cursor on exit


Version published
Weekly downloads
38M
increased by1.95%
Maintainers
1
Install size
91.9 kB
Created
Weekly downloads
 

Package description

What is restore-cursor?

The restore-cursor npm package is designed to restore the CLI cursor when a Node.js application exits. It ensures that the cursor is visible and functioning correctly after the application has finished running, which is particularly useful for CLI tools that manipulate the cursor visibility.

What are restore-cursor's main functionalities?

Restoring cursor on exit

This feature ensures that the cursor is restored when the process exits, either normally or due to an error. The code sample demonstrates how to use the package to automatically restore the cursor when the process exits.

const restoreCursor = require('restore-cursor');
restoreCursor();

Other packages similar to restore-cursor

Readme

Source

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();

Keywords

FAQs

Last updated on 28 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc