random-sentence
Return a random sentence populated by semi-pronounceable random (nonsense) words.
Install
$ npm install --save random-sentence
Usage
For more use-cases see the tests
var randomSentence = ; // API// - randomSentence([options]); // options// - words// - min// - max
The sentence starts with a capital letter, and ends with a period.
Default is a sentence with a random number of words from 12
to 18
.
This length is chosen as the default as it works out to the average English sentence is in that range.
;// => 'Witpevze mappos isoletu fo res bi geow pofin mu rupoho revzi utva ne.'
Optionally specify the number of words in the sentence:
;// => 'Waddik jeasmov cakgilta ficub up.'
Can optionally provide min
and max
, then with a random words count:
;// => 'Fusce dapibus tellus ac cursus commodo.'
Note: these min and max are inclusive, so they are included in the range.
Related
- random-syllable - Return a semi-speakable syllable, 2 or 3 letters.
- random-lorem - Return a semi-pronounceable random (nonsense) word.
- random-title - Return a random title populated by semi-pronounceable random (nonsense) words.
- random-paragraph - Return a random paragraph generated from sentences populated by semi-pronounceable random (nonsense) words.
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.