jccp_a/vuepress/node_modules/cli-cursor
hellcat ac91e1fbe4 1
2025-11-12 17:57:30 +08:00
..
index.d.ts 1 2025-11-12 17:57:30 +08:00
index.js 1 2025-11-12 17:57:30 +08:00
license 1 2025-11-12 17:57:30 +08:00
package.json 1 2025-11-12 17:57:30 +08:00
readme.md 1 2025-11-12 17:57:30 +08:00

cli-cursor

Toggle the CLI cursor

The cursor is gracefully restored if the process exits.

Install

npm install cli-cursor

Usage

import cliCursor from 'cli-cursor';

cliCursor.hide();

const unicornsAreAwesome = true;
cliCursor.toggle(unicornsAreAwesome);

API

.show(stream?)

.hide(stream?)

.toggle(force?, stream?)

force

Useful for showing or hiding the cursor based on a boolean.

stream

Type: stream.Writable
Default: process.stderr