❀Nebulous Puffy Marshmallows

npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up Β»

permutated

1.0.1Β β€’Β PublicΒ β€’Β Published




π“Ÿβ„―π“‡π‘šπ“Šπ“‰π’Άπ“‰β„―π’Ή: get all available combinations

Install

$ npm install permutated

Why Permutated?

  • Generate all available permutations
  • Clean and focused
  • Actively maintained

Notice notice

Since the complexity of the permutations algorithm, Permutated could take a some time

Example:

7 letters word ~> complexity 7!: 5040 available combinations to generate

Usage

constΒ permutatedΒ =Β require('permutated');
Β 
(asyncΒ ()Β =>Β {
Β Β Β Β console.log(awaitΒ permutated('abc'));
Β Β Β Β //=>Β [Β 'abc',Β 'acb',Β 'bac',Β 'bca',Β 'cab',Β 'cba'Β ]
Β 
Β Β Β Β console.log(awaitΒ permutated.getLength('1234567'));
Β Β Β Β //=>Β 5040
})();

API

permutated(word)

Return array with permutations

  • name - Type String
  • Return: Type Array

permutated.getLength(word)

Return array length

  • name - Type String or int
  • Return: Type int

Team

Carlos Abraham Logo
Carlos Abraham

License

MIT License Β© Carlos Abraham

install

npm i permutated

Downloadsweekly downloads

0

version

1.0.1

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability