Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 14, 2024 via pnpm

console-control-strings 1.1.0

A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.
Package summary
Share
0
issues
1
license
1
ISC
Package created
15 Jun 2016
Version published
15 Jun 2016
Maintainers
1
Total deps
1
Direct deps
0
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
console-control-strings@1.1.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of console-control-strings 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does console-control-strings do?

Console-control-strings is an NPM package that provides tested terminal/console command strings to execute functions like color alteration and cursor positioning. A feature of interest is its compatibility with both Windows and Unix-like operating systems, leaving aside any exceptions. It's essentially a subset of both ANSI and VT100. The library strives to emit standalone start color codes, emits strings without writing to streams, and avoids carrying unnecessary baggage. The main advantages of using console-control-strings are its clear compatibility goals and its ability to return strings without writing to streams.

How do you use console-control-strings?

In order to use console-control-strings, it first needs to be required in your JavaScript file. After that, you can call its functions to perform various operations on the console. For instance, to change the color of text, you might use consoleControl.color(...), passing in the desired colors and styles. Cursor movements are possible through the consoleControl.goto(...) function, allowing specific cursor positioning. Here is a basic example:

var consoleControl = require('console-control-strings')

console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset'))
process.stdout.write(consoleControl.goto(75, 10))

In this code, 'hi there' will be printed in bold with blue text on a red background. The cursor is then moved to the location (75,10).

Where are the console-control-strings docs?

The documentation for console-control-strings can be found in the README file on the pacakage's GitHub repository, available at the URL: https://github.com/iarna/console-control-strings. It details the different functions and parameter options available, along with descriptions of their effects.

All Versions