string-combos
v1.0.1
Published
Easily create a combination of strings
Downloads
2
Maintainers
Readme
string-combos
Easily create a combination of strings
Install
$ npm install string-combos
Usage
const combos = require('string-combos')
combos('Alice is ' + combos('cool', 'great'))
// => [ 'Alice is cool', 'Alice is great' ]
combos(combos('alice', 'bob') + '-' + combos('charlie', 'dan'))
// => [ 'alice-charlie', 'bob-charlie', 'alice-dan', 'bob-dan' ]
combos(`Alice ${combos('and', 'or')} Bob`)
// => [ 'Alice and Bob', 'Alice or Bob' ]