right-padding

Right padding for strings

Usage no npm install needed!

<script type="module">
  import rightPadding from 'https://cdn.skypack.dev/right-padding';
</script>

README

right-pad(ding)

Left pad for right minded people

Install

$ npm install right-padding

Usage

rightpad = require('right-padding')

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

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

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