atropa-string-pad

Pads strings on the right or left with user defined characters or strings.

#atropa-string-pad

Pads strings on the right or left with user defined characters or strings.

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

Documentation is in the docs/jsdoc folder. Visual Studio intellisense files are in docs/vsdocs

Run the tests in node with npm test. Run the tests in your browser by opening atropa-string-pad tester.html.