Pad left with some chars given a fixed length. An implementation of pad left at its simplest.
npm install --save pad-left-simple
var padLeft = require('pad-left-simple');
padLeft('hello', 10); // " hello"
padLeft('10101', 10, '0'); // "0000010101"
npm test
There is no other reason, this implementation is just simpler and might not be that efficient.