npm.io
1.0.0 â€ĸ Published 8 years ago

paddy

Licence
MIT
Version
1.0.0
Deps
0
Size
1 kB
Vulns
0
Weekly
0

Paddy

Tiny (60B) JavaScript module for inserting character padding into a string

Purpose

Paddy allows you to insert a padding of desired length and content within a string.

Example

const simpleTab     = paddy(4);
const ghostTab      = paddy(4, 'đŸ‘ģ');

const simplePhrase  = `${simpleTab}I love simple tabs!`;
const complexPhrase = `${ghostTab}I love ghost tabs!`;

console.log(simplePhrase);  // "    I love simple tabs!"
console.log(complexPhrase); // "đŸ‘ģđŸ‘ģđŸ‘ģđŸ‘ģI love ghost tabs!"

Keywords