@types/wrap-ansi

  • Version 8.0.0
  • Published
  • 3.58 kB
  • No dependencies
  • MIT license

Install

npm i @types/wrap-ansi
yarn add @types/wrap-ansi
pnpm add @types/wrap-ansi

Overview

TypeScript definitions for wrap-ansi

Index

Functions

Namespaces

Functions

function wrapAnsi

wrapAnsi: (input: string, columns: number, options?: wrapAnsi.Options) => string;
  • Wrap words to the specified column width.

    Parameter input

    String with ANSI escape codes. Like one styled by chalk.

    Parameter columns

    Number of columns to wrap the text to.

    Parameter options

    By default the wrap is soft, meaning long words may extend past the column width. Setting this to true will make it hard wrap at the column width.

Namespaces

namespace wrapAnsi

namespace wrapAnsi {}

    interface Options

    interface Options {}

      property hard

      hard?: boolean;
      • false

      property trim

      trim?: boolean;
      • true

      property wordWrap

      wordWrap?: boolean;
      • true

      Package Files (1)

      Dependencies (0)

      No dependencies.

      Dev Dependencies (0)

      No dev dependencies.

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/wrap-ansi.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/wrap-ansi)
      • HTML
        <a href="https://www.jsdocs.io/package/@types/wrap-ansi"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>