@types/wordwrap

  • Version 1.0.1
  • Published
  • 6 kB
  • No dependencies
  • MIT license

Install

npm i @types/wordwrap
yarn add @types/wordwrap
pnpm add @types/wordwrap

Overview

TypeScript definitions for wordwrap

Index

Functions

Interfaces

Type Aliases

Functions

function hard

hard: { (stop: number): Wrap; (start: number, stop: number): Wrap };
  • Wrap lines until column stop. Break up chunks longer than stop.

  • Wrap lines until column stop. Break up chunks longer than stop - start.

function wordwrap

wordwrap: typeof wordwrap;
  • Wrap lines until column stop. If a word is longer than stop characters it will overflow.

  • Pad out lines with spaces out to column start and then wrap until column stop. If a word is longer than stop - start characters it will overflow.

Interfaces

interface Options

interface Options {}

    property mode

    mode?: Mode | undefined;

      property start

      start: number;

        property stop

        stop: number;

          Type Aliases

          type Mode

          type Mode = 'soft' | 'hard';
          • In "soft" mode, split chunks by /(\S+\s+/ and don't break up chunks which are longer than stop - start, in "hard" mode, split chunks with /\b/ and break up chunks longer than stop - start.

          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/wordwrap.

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