Left-pad each line in a string
$ npm install lpad
import leftPad from 'lpad';
const string = 'foo\nbar';
/*
foo
bar
*/
lpad(string, ' ');
/*
foo
bar
*/
Pads each line in a string with the supplied string.
Type: string
String that will be padded.
Type: string
String that will be prepended to each line.