🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

fast-wrap-ansi

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-wrap-ansi

A tiny and fast text wrap library which takes ANSI escapes into account.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

fast-wrap-ansi

Wordwrap a string, taking ANSI escape codes into account.

A fast, light fork of the wrap-ansi package.

Install

npm i -S fast-wrap-ansi

Usage

import {wrapAnsi} from 'fast-wrap-ansi';

const str = 'This is a string with some \x1b[31mANSI\x1b[39m codes.';
const wrapped = wrapAnsi(str, 20);
console.log(wrapped);

License

MIT

Keywords

wrap

FAQs

Package last updated on 30 Sep 2025

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