deli-space
v1.0.0
Published
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.
Downloads
10
Maintainers
Readme
#deli-space
Use:
Syntax is simple: ds(padding, delimiter, group, group, group, ...groups)
// es6 import
import ds from 'deli-space'
// commonjs require
const ds = require('deli-space')
ds('*', '-', 4, 5, 6)
// Outputs: "****-*****-******"
ds('•', ' ', 4, 4, 4, 4)
// Outputs: '•••• •••• •••• ••••')