Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

lpad

2.0.1 • Public • Published

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

install

npm i lpad

Downloadsweekly downloads

49,850

version

2.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar