Skip to content

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.

License

willhackett/deli-space

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#deli-space

### Use:

Syntax is simple: `ds(padding, delimiter, group, group, group, ...groups)`

```javascript:
// 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: '•••• •••• •••• ••••')

```

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published