cli-cursor
Toggle the CLI cursor
Last updated 11 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cli-cursor 
SYNC missed versions from official npm registry.

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

Current Tags

  • 5.0.0                                ...           latest (2 years ago)

9 Versions

  • 5.0.0                                ...           2 years ago
  • 4.0.0                                ...           5 years ago
  • 3.1.0                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago

Copyright 2013 - present © cnpmjs.org | Home |