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 Jun 21, 2024 via pnpm
Package summary
Share
0
issues
2
licenses
1
MIT
1
(MIT OR CC0-1.0)
Package created
14 Aug 2015
Version published
24 Mar 2021
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

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

(MIT OR CC0-1.0)

Public Domain
1 Packages, Including:
type-fest@0.21.3
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

1
All Dependencies CSV
β“˜ This is a list of ansi-escapes 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
type-fest0.21.339.03 kB(MIT OR CC0-1.0)
prod

Visualizations

Frequently Asked Questions

What does ansi-escapes do?

The ansi-escapes package provides ANSI escape codes for manipulating the terminal in JavaScript. ANSI escape codes are sequences of bytes which can be used to control formatting, color, and other output layout tasks in text terminals. This npm package can be used to move the cursor, erase text, scroll display, and even display images or create clickable links in compatible terminals.

How do you use ansi-escapes?

To use ansi-escapes, you first need to install it via npm using the command npm install ansi-escapes. You can then import ansi-escapes in your JavaScript file using ES6 imports. Here is an example of how to move the cursor two rows up and to the left:

import ansiEscapes from 'ansi-escapes';
process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft);

This will result in the code '\u001B[2A\u001B[1000D' which performs the desired actions in the terminal. The package can also be used in the browser with Xterm.js:

import ansiEscapes from 'ansi-escapes';
import {Terminal} from 'xterm';
import 'xterm/css/xterm.css';

const terminal = new Terminal({...});

terminal.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft);

Where are the ansi-escapes docs?

The ansi-escapes documentation is found in the package's README on GitHub. It gives a complete list of all of the functions available in the package and how to use them. Each function is accompanied by short descriptions and examples that demonstrate their usage. Among these, you can find functions to manipulate the cursor position, to erase lines, to scroll up and down, to display images, create clickable links, and many other useful terminal manipulations. So, for a detailed guide on how to use ansi-escapes, the README on GitHub is the best source to refer to.