Closed ZodsPlan closed 6 years ago
You must be mistaken. Works perfectly for me:
const combinatorics = require("js-combinatorics");
const items = combinatorics.permutation([0,1,2]).toArray();
console.log(items.join("|"));
Outputs 0,1,2|0,2,1|1,0,2|1,2,0|2,0,1|2,1,0
as expected.
using the npm version of this module does not work. The combinatorics.js file does not seem to have an export statement and perhaps that is causing the problem?