UNPKG

deli-space

Version:

Produces a string with groups of a custom padding value with a custom delimiter. Useful for generating credit card strings or blank strings with the correct length.

4 lines (2 loc) 145 B
t deliSpace = (filler, divider, ...rest) => rest.map(f => Array(parseInt(f, 0)).fill(filler).join('')).join(divider); export default deliSpace;