/ live.thehmm.nl / back / node_modules / ansi-align /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[TXT]CHANGELOG.md39 years ago1.7K 
[   ]LICENSE39 years ago731  
[TXT]README.md39 years ago2.9Kd7c1522 post receive test [كارل مبارك]
[   ]index.js39 years ago1.3K 
[   ]package.json2 years ago1.7K 
README.md

ansi-align

align-text with ANSI support for CLIs

Build Status Coverage Status Standard Version Greenkeeper badge

Easily center- or right- align a block of text, carefully ignoring ANSI escape codes.

E.g. turn this:

ansi text block no alignment :(

Into this:

ansi text block center aligned!

Install

npm install --save ansi-align
var ansiAlign = require('ansi-align')

API

ansiAlign(text, [opts])

Align the given text per the line with the greatest string-width, returning a new string (or array).

Arguments

Options

ansiAlign.center(text)

Alias for ansiAlign(text, { align: 'center' }).

ansiAlign.right(text)

Alias for ansiAlign(text, { align: 'right' }).

ansiAlign.left(text)

Alias for ansiAlign(text, { align: 'left' }), which is a no-op.

Similar Packages

License

ISC © Contributors

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80