$ npm install --save cat-pad
const catPad = require('cat-pad');
catPad('Meow', 6);
//=> 'ππMeow'
Pads input
with cats on the left side if it's shorter than length
. Padding cats are truncated if they exceed length
.
Type: string
String to pad.
Type: number
Default: 0
Padding length.
MIT Β© Sindre Sorhus