cli-columns
Columnated lists for the CLI. Unicode and ANSI safe.
Install
$ npm install --save cli-columns
Usage
const chalk = ;const columns = ; const values = 'blue' + chalk '笔菠萝' + chalk chalk 'pomegranate' 'durian' chalk 'パイナップル' 'apricot' 'banana' 'pineapple' chalkbgRed; console;

API
columns(values [, options]): String
values
{Array<String>}
Array of strings to display.options
{Object}
character
{String}
(default:' '
) Padding character.newline
{String}
(default:'\n'
) Newline character.padding
{Number}
(default:2
) Space between columns.sort
{Boolean}
(default:true
) Whether to sort results.width
{Number}
(default:process.stdout.columns
) Max width of list.
Sorts and formats a list of values into columns suitable to display in a given width.
Contribute
Standards for this project, including tests, code coverage, and semantics are enforced with a build tool. Pull requests must include passing tests with 100% code coverage and no linting errors.
Test
$ npm test
© Shannon Moeller me@shannonmoeller.com (shannonmoeller.com)
Licensed under MIT