enum-all

1.0.0 • Public • Published

enum-all

enumerate all the elments in a given array for given capacity

Build Status

Usage

Example

  //generate all 3 letter string using numbers between 1 and 5
  var enumAll = require('enum-all')
  
  var arr = ['1','2','3','4','5']
  var capacity = 3
 
  //result is an array containing all possible combinations
  var result = enumAll(arr, capacity) 
  console.log(result)

API

require('enum-all')(arr, capacity)

returns an array containing all combinations of elements in an array arr for given capacity

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i enum-all

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • incessantmeraki