Socket
Socket
Sign inDemoInstall

restore-cursor

Package Overview
Dependencies
3
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

restore-cursor

Gracefully restore the CLI cursor on exit

    5.0.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
36,838,035
increased by3.22%

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 installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the 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