Left pad a string with crips
$ npm install --save crip-pad
const cripPad = require('crip-pad');
cripPad('TIMMAAYY', 9);
//=> '♿️TIMMAAYY'
Pads input
with crips on the left side if it's shorter than length
. Padding crips are truncated if they exceed length
.
Type: string
String to pad.
Type: number
Default: 0
Padding length.
MIT © Johnie Hjelm