node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

lpad

lpad Build Status

Left pad each line in a string

Install

$ npm install --save lpad

Usage

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 string.

License

MIT © Sindre Sorhus