string-combinations

1.0.2 • Public • Published

string-combinations

This module is used to generate all possible combinations of a given input String.

Input : Any valid String
Output : An array of all possible combinations

Example Usage

var combinations = require('string-combinations');
var result = combinations.generate("abcde");

Sample Output

[ 'a', 'b', 'ab', 'c', 'ac', 'bc', 'abc', 'd', 'ad', 'bd', 'abd', 'cd', 'acd', 'bcd', 'abcd', 'e', 'ae', 'be', 'abe', 'ce', 'ace', 'bce', 'abce', 'de', 'ade', 'bde', 'abde', 'cde', 'acde', 'bcde', 'abcde' ]

Contact Info

Please raise any issues at this page

Package Sidebar

Install

npm i string-combinations

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • brlalithkumar