1.0.6 • Published 3 years ago

ak-phrase v1.0.6

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

ak-phrase

Contributors Github Repo Size Build Status NPM Downloads Commit LICENSE NPM Version

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.

Please consider donating, if you like my work.

Install

npm install ak-phrase

or

yarn add ak-phrase

Usage

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' ]

Contributing

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.

Contributors

Thank you to all the contributors who have helped us in making this project better 🙌