Skip to content

Latest commit

 

History

History
 
 

array-permutations

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

just-array-permutations

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

import permutations from 'just-array-permutations;

permutations([1, 2, 3]); // [[1, 2, 3], [2, 1, 3], [2, 3, 1], [1, 3, 2], [3, 1, 2], [3, 2, 1]]
permutations([]); // []
permutations(); // throws