lpad

Left pad each line in a string

npm install lpad
1 541 downloads in the last day
24 441 downloads in the last week
103 385 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