atropa-string-pad

0.1.0-4 • Public • Published

atropa-string-pad

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

Usage

In Browser

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.

In Nodejs

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

Docs

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

Tests

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

Readme

Keywords

none

Package Sidebar

Install

npm i atropa-string-pad

Weekly Downloads

1

Version

0.1.0-4

License

GPL-3.0

Last publish

Collaborators

  • kastor