Skip to content

trenskow/combinations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@trenskow/combinations

Small package that iterates an array and returns all ordering combinations.

Usage

import combinations from '@trenskow/combinations';

combinations([1, 2, 3])

/*
	-> [
			[],
			[ 1 ],
			[ 1, 2 ],
			[ 1, 2, 3 ],
			[ 1, 3 ],
			[ 1, 3, 2 ],
			[ 2 ],
			[ 2, 1 ],
			[ 2, 1, 3 ],
			[ 2, 3 ],
			[ 2, 3, 1 ],
			[ 3 ],
			[ 3, 1 ],
			[ 3, 1, 2 ],
			[ 3, 2 ],
			[ 3, 2, 1 ]
		]
*/

License

See license in LICENSE

About

Small package that iterates an array and returns all ordering combinations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors