fuc-new/doc/node_modules/cli-cursor
2025-10-15 12:40:55 +08:00
..
index.d.ts 1 2025-10-03 17:17:08 +08:00
index.js 1 2025-10-03 17:17:08 +08:00
license 1 2025-10-03 17:17:08 +08:00
package.json 1 2025-10-03 17:17:08 +08:00
readme.md no message 2025-10-15 12:40:55 +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