Lines Matching +refs:text +refs:line

1text [![NPM version](https://badge.fury.io/js/align-text.svg)](http://badge.fury.io/js/align-text)…
3 > Align the text in a string.
7 Align text values in an array:
25 $ npm i align-text --save
31 var align = require('align-text');
32 align(text, callback_function_or_integer);
37 * `text` can be a **string or array**. If a string is passed, a string will be returned. If an arra…
38text will be indented by that amount. If a function, it must return an integer representing the am…
43 align(text, 4);
66 The callback is used to determine the indentation of each line and gets the following params:
68 * `len` the length of the "current" line
69 * `longest` the length of the longest line
70 * `line` the current line (string) being aligned
81 …- `prefix`: **{String}** leading characters to use at the beginning of each line. `''` (empty stri…
87 // of the current line and the longest line
88 function centerAlign(len, longest, line, lines) {
96 function centerAlign(len, longest, line, lines) {
112 align(text, centerAlign);
115 Would align this text:
141 For example, to add 4 spaces before every line:
144 function centerAlign(len, longest, line, lines) {
163 align(text, function (len, max, line, lines) {
182 align(text, function (len, max, line, lines) {
203 * [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string.
204 * [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using …
206 * [right-align](https://github.com/jonschlinkert/right-align): Right-align the text in a string.
220 … feature requests, [please create an issue](https://github.com/jonschlinkert/align-text/issues/new)