Padifier can be used to add padding on left or right side of a string.
Padding can be empty spaces or any character.
npm install padifier
var padifier = require('padifier');
padifier.padLeft('howdy', 5, ' '); // pad with empty space
padifier.padLeft('howdy', 5, '$'); // pad with $ sign
var padifier = require('padifier');
padifier.padRight('howdy', 5, ' '); // pad with empty space
padifier.padRight('howdy', 5, '$'); // pad with $ sign
var padifier = require('padifier');
padifier.padBoth('howdy', 5, ' '); // pad with empty space
padifier.padBoth('howdy', 5, '$'); // pad with $ sign
npm install && npm test
MIT