An open API service indexing awesome lists of open source software.

https://github.com/willhackett/deli-space

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.
https://github.com/willhackett/deli-space

Last synced: 9 months ago
JSON representation

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.

Awesome Lists containing this project

README

          

#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: '•••• •••• •••• ••••')

```