ak-phrase

1.0.6 • Public • Published

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.

Buy Me A Coffee Become a Patron!

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 🙌

Package Sidebar

Install

npm i ak-phrase

Weekly Downloads

2

Version

1.0.6

License

MIT

Unpacked Size

7.07 kB

Total Files

4

Last publish

Collaborators

  • arshadkazmi42