Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

ak-phrase

1.0.3 • Public • Published

ak-phrase.js

Build Status

This library generates all the permutations of sentences from words in a 2D array.

It follows the word orders in sentence, same as the words order in array column wise.

Buy Me A Coffee Become a Patron!

Please consider donating, if you like my work

Install

$ npm install ak-phrasae.js

Usage

const sentenceGenerator = require('ak-phrase.js');
 
const wordArray = [
    ['eat'],
    ['code', 'commit'],
    ['sleep']
];
 
const sentences = sentenceGenerator.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 on getting started with contributing to the codebase

Contributors

install

npm i ak-phrase

Downloadsweekly downloads

4

version

1.0.3

license

GPL-3.0-or-later

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability