Skip to content

rf/columnize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

columnize: print data in columns

Print data in columns in node.js. Install it like this

$ npm i columnize

Use it like this

var columnize = require('columnize');
var output = columnize(3); // three columns

output(0, "hello!");
output(2, "derp");

require('child_process').spawn('uptime').on('data', output(1));

columnize() creates a function which you can call with the column # and some data to insert into it. You can also partially apply this function; output(1) above returns a function which just takes data as input and throws it into column 1.

Thats about it. Enjoy.

License

MIT (as always)

About

print stuff in columns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published