pad-left-simple
v1.0.1
Published
Pad left with some chars given a fixed length.
Downloads
3
Readme
Pad left simple
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.