1.0.1 • Published 7 years ago

pad-left-simple v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Pad left simple

Build Status

Pad left with some chars given a fixed length. An implementation of pad left at its simplest.

Install

npm install --save pad-left-simple

Usage

var padLeft = require('pad-left-simple');

padLeft('hello', 10); // "     hello"
padLeft('10101', 10, '0'); // "0000010101"

Test

npm test

Why not other packages?

There is no other reason, this implementation is just simpler and might not be that efficient.