/right-pad

String right pad

Primary LanguageJavaScriptMIT LicenseMIT

right-pad

String right pad.

Usage

var rightpad = require('rightpad');

rightpad('foo', 5);
// => "foo  "

rightpad('foobar', 6);
// => "foobar"

rightpad(1, 2, 0);
// => "10"