@cjser/lpad
v3.0.0-cjser.2
Published
Left-pad each line in a string
Downloads
78
Maintainers
Readme
lpad
Left-pad each line in a string

Install
$ npm install lpadUsage
import leftPad from 'lpad';
const string = 'foo\nbar';
/*
foo
bar
*/
lpad(string, ' ');
/*
foo
bar
*/API
lpad(string, padString)
Pads each line in a string with the supplied string.
string
Type: string
String that will be padded.
padString
Type: string
String that will be prepended to each line.
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/lpad
