0.0.2 • Published 7 years ago
limited-permutation v0.0.2
limited-permutation
Generate a limited permutation, for NodeJS
Install
npm install limited-permutation
Usage
const permutation = require('limited-permutation');
const result = permutation('abc', 2);
console.log(result);
STDOUT is below;
[
[ 'a', 'a' ],
[ 'a', 'b' ],
[ 'a', 'c' ],
[ 'b', 'a' ],
[ 'b', 'b' ],
[ 'b', 'c' ],
[ 'c', 'a' ],
[ 'c', 'b' ],
[ 'c', 'c' ]
]