File: sentence.md

package info (click to toggle)
node-chance 2.2.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,612 kB
  • sloc: javascript: 16,572; makefile: 4
file content (28 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# sentence

```js
// usage
chance.sentence()
chance.sentence({ words: 5 })
```

Return a random sentence populated by semi-pronounceable random (nonsense) words.

```js
  chance.sentence();
  => 'Witpevze mappos isoletu fo res bi geow pofin mu rupoho revzi utva ne.'
```

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.*

Optionally specify the number of words in the sentence.

```js
  chance.sentence({ words: 5 });
  => 'Waddik jeasmov cakgilta ficub up.'
```