1.0.0 • Published 10 years ago
sidenote v1.0.0
sidenote
Given a list of string pairs, align each pair to the left and to the right.
Usage
rows = sidenote(list, opts)
Accepts a list
of string pairs in the following format:
var list = [
['left hand side', '{right hand side}'],
['another', 'piece of text']
]
And returns properly aligned rows
like so:
return [
'left hand side {right hand side}',
'another piece of text'
]
Optionally, you can pass in the following options:
opts.character
: the character with which to pad the gaps between strings. Defaults to.
opts.distance
: add additional space between each column. Defaults to 1.
License
MIT. See LICENSE.md for details.
1.0.0
10 years ago