Chop Suey 杂碎 is a stir-fried vegetable dish usually with meat or seafood.
In honor of such wonderful food, this npm package is built to imitate the elegant mixing and matching of its ingredients through the functions in combinatorics.
This includes:
- Subsets
- Permutations
- Shuffle
npm i chopsuey
import ChopSuey from 'ChopSuey';
...
for(const subset of Chopsuey.generateSubsets(array)) {
...
}
...
import ChopSuey from 'ChopSuey';
...
const subsets = Chopsuey.geSubsets(array);
...