1.0.1 • Published 6 years ago

string-combos v1.0.1

Weekly downloads
6
License
ISC
Repository
github
Last release
6 years ago

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' ]