lpad

Left pad each line in a string

npm install lpad
4 830 downloads in the last day
23 527 downloads in the last week
108 054 downloads in the last month

lpad Build Status

Left pad each line in a string

screenshot

Install

$ npm install --save lpad

Example

var lpad = require('lpad');

var str = 'foo\nbar';
/*
foo
bar
*/

lpad(str, '    ');
/*
    foo
    bar
*/

API

lpad(string, pad)

Pads each line in a string with the supplied pad string.

License

MIT © Sindre Sorhus

npm loves you