Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Left pad each line in a string
JavaScript
branch: master
Failed to load latest commit information.
.editorconfig minor style tweaks
.gitattributes tweaks
.gitignore [breaking] simplify API
.jshintrc minor style tweaks
.travis.yml Update .travis.yml
index.js do not pad an empty line
license tweaks
package.json 2.0.1
readme.md minor style tweaks
screenshot.png
test.js

readme.md

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

Something went wrong with that request. Please try again.