README
cf-left-pad
String left pad.
Install
$ npm install cf-left-pad
Usage
leftpad = require('cf-left-pad')
leftpad('foo', 5)
// => " foo"
leftpad('foobar', 6)
// => "foobar"
leftpad(1, 2, 0)
// => "01"
String left pad.
<script type="module">
import cfLeftPad from 'https://cdn.skypack.dev/cf-left-pad';
</script>
String left pad.
$ npm install cf-left-pad
leftpad = require('cf-left-pad')
leftpad('foo', 5)
// => " foo"
leftpad('foobar', 6)
// => "foobar"
leftpad(1, 2, 0)
// => "01"