UNPKG

just-permutations

Version:

Returns all permutations of the length N of the elements of the given Array

2 lines (1 loc) 78 B
export default function permutations<T>(arr: T[]): T[][]; // for empty arrays