Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ansi

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi

Advanced ANSI formatting tool for Node.js

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
578K
decreased by-14.05%
Maintainers
2
Weekly downloads
 
Created

What is ansi?

The 'ansi' npm package provides a set of utilities for working with ANSI escape codes, which are used to control text formatting, color, and other output options on text terminals. This package allows you to manipulate text output in the terminal, making it more readable and visually appealing.

What are ansi's main functionalities?

Text Formatting

This feature allows you to format text in the terminal. The example code demonstrates how to make text bold using the 'ansi' package.

const ansi = require('ansi');
const cursor = ansi(process.stdout);
cursor.bold().write('Bold text').reset();

Text Coloring

This feature allows you to change the color of the text in the terminal. The example code shows how to make text red using the 'ansi' package.

const ansi = require('ansi');
const cursor = ansi(process.stdout);
cursor.red().write('Red text').reset();

Cursor Positioning

This feature allows you to move the cursor to a specific position in the terminal. The example code demonstrates how to move the cursor to position (10, 5) and write text there using the 'ansi' package.

const ansi = require('ansi');
const cursor = ansi(process.stdout);
cursor.goto(10, 5).write('Text at position (10, 5)').reset();

Other packages similar to ansi

Keywords

FAQs

Package last updated on 15 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc