This library generates all the permutations of sentences using the words supplied in a 2D array.
It follows the word's order in a sentence, which is the same as the word's column order in an array.
npm install ak-phrase
or
yarn add ak-phrase
const generateSentences = require('ak-phrase');
const wordArray = [
['eat'],
['code', 'commit'],
['sleep']
];
const sentences = generateSentences(wordArray);
console.log(sentences);
// Output:
// [ 'eat code sleep', 'eat commit sleep' ]
Interested in contributing to this project? You can log any issues or suggestion related to this library here.
Read our contributing guide to get started with contributing to the codebase.
Thank you to all the contributors who have helped us in making this project better 🙌