Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Padifier can be used to add padding on left or right side of a string.

Padding can be empty spaces or any character.

How to use

npm install padifier

Left padding

var padifier = require('padifier');
padifier.padLeft('howdy', 5, ' '); // pad with empty space
padifier.padLeft('howdy', 5, '$'); // pad with $ sign

Right padding

var padifier = require('padifier');
padifier.padRight('howdy', 5, ' '); // pad with empty space
padifier.padRight('howdy', 5, '$'); // pad with $ sign

Pad both left and right

var padifier = require('padifier');
padifier.padBoth('howdy', 5, ' '); // pad with empty space
padifier.padBoth('howdy', 5, '$'); // pad with $ sign

Run Tests

npm install && npm test

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages