Pads strings on the right or left with user defined characters or strings.
Where do I get it?
You can download it from github at https://github.com/matthewkastor/atropa-string-pad or, if you have node installed you can get it from npm
npm install atropa-string-pad
Using this module in your browser is as simple as including it in your page. See example.html in the root directory of this package.
Simply require it and use it.
var pad = require('pad'); console.log( pad(6, 'wee', 'um') ); // logs umuwee console.log( pad(6, 'wee', 'um', true) ); // logs weeumu
Run the tests in node with
npm test. Run the tests in your browser by opening