string-combos

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i string-combos

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.17 kB

Total Files

5

Last publish

Collaborators

  • craigh2013