stackoverflow

View on StackOverflow

You can install permutated

Installing

$ npm install permutated

Usage

const permutated = require('permutated');

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