UNPKG

149 BJavaScriptView Raw
1const array = require("extra-array");
2
3[...array.permutations([1, 2])];
4
5[...array.permutations([1, 2, 3])];
6
7[...array.permutations([1, 2, 3], 2)];