Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

terminal-utilities

yamboy123MIT2.4.1

An easy to use synchronous node.js library for using the Linux terminal.

terminal, linux

readme

terminal-utilities

Travis JavaScript Style Guide npm David

An easy to use synchronous node.js library for using the terminal.

Installation

npm install terminal-utilities

Usage

const terminal = require('terminal-utilities')

Docs

setCursor(cols, rows)

This positions the cursor based on cols and rows.

clear()

This clears the terminal screen.

clearLine(line)

This clears a specific line.

write(text)

This prints text to the terminal.

writeLine(text)

This prints text to the terminal, followed by a \n.

readLine()

This reads one line of input and returns it.

error(message)

This prints an error to the terminal in the form: ERR: message

changelog

Changelog

v2.3.2

  • Fix lint errorss

v2.3.1

  • Fix Buffer support

v2.3.0

  • Change use_strict to 'use strict'
  • Add mocha tests for setCursor

v2.2.1

  • Fix link on travis-ci badge
  • Add more information to the documentation
  • Add use_strict for backwards compatibility with node.js < 4

v2.2.0

  • Create basic documentation
  • Remove devDependencies badge

v2.1.0

  • Fix the check for tty
  • Replace ncu with david
  • Remove unnecessary variable
  • Remove broken ctrl-c event

v2.0.4

  • Fix markdown files

v2.0.3

  • Shorten code
  • Fix code that still has the old name

v2.0.2

  • Update Readme

v2.0.1

  • Remove postInstall script

v2.0.0

  • Rename to terminal-utilities due to package name conflict
  • Add error method

v1.0.1

  • Fix documentation build error on v1.0.0

v1.0.0

  • First stable release
  • Add basic documentation

v0.3.1

  • Update readline implementation to use readline-sync
  • Update error messages to all look the same
  • Add postInstall script to fix package dependencies not installing

v0.2.2

v1.2.1-old

  • Bug Fixes
  • Update Documentation

v1.2.0-old

  • Add changelog
  • Add support for buffers
  • Remove the need to use .toString() for write calls

v1.0.1-old

  • Fix documentation build error