permutation
v0.0.1
Published
Find all permutations of a string
Downloads
8
Readme
permutations
Find all permutations of string
Install
npm install permutation
Usage
var permutations = require('permutation');
permutations('abc') // [ 'abc', 'acb', 'bac', 'bca', 'cab', 'cba' ]
permutations('ab') // [ 'ab', 'ba']
permutations('aa') // [ 'aa', 'aa' ]
permutations('aa', {unique: true}) // [ 'aa' ]
License
MIT