@types/wordwrap
- Version 1.0.3
- Published
- 5.53 kB
- No dependencies
- MIT license
Install
npm i @types/wordwrapyarn add @types/wordwrappnpm add @types/wordwrapOverview
TypeScript definitions for wordwrap
Index
Functions
function hard
hard: { (stop: number): Wrap; (start: number, stop: number): Wrap };Wrap lines until column
stop. Break up chunks longer thanstop.Wrap lines until column
stop. Break up chunks longer thanstop - start.
function wordwrap
wordwrap: typeof wordwrap;Wrap lines until column
stop. If a word is longer thanstopcharacters it will overflow.Pad out lines with spaces out to column
startand then wrap until columnstop. If a word is longer thanstop - startcharacters it will overflow.
Interfaces
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 thanstop - start, in "hard" mode, split chunks with/\b/and break up chunks longer thanstop - 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 oneto 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[](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>
- Updated .
Package analyzed in 3593 ms. - Missing or incorrect documentation? Open an issue for this package.
