Skip to content

computational-combinatorics/n-permutations

Repository files navigation

Set n-permutations for JavaScript. See docs.

⚠️ Depending on your environment, the code may require regeneratorRuntime to be defined, for instance by importing regenerator-runtime/runtime.

import {permutations} from '@combinatorics/n-permutations';
permutations("ABCD", 2); // AB AC AD BA BC BD CA CB CD DA DB DC

import {range} from '@iterable-iterator/range';
permutations(range(3), 3); // 012 021 102 120 201 210

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size