1
2
3const WORDS = [
4 'the', 'be', 'of', 'and', 'a', 'to', 'in', 'he', 'have', 'it',
5 'that', 'for', 'they', 'with', 'as', 'not', 'on', 'she', 'at', 'by',
6 'this', 'we', 'you', 'do', 'but', 'from', 'or', 'which', 'one', 'would',
7 'all', 'will', 'there', 'say', 'who', 'make', 'when', 'can', 'more', 'if',
8 'no', 'man', 'out', 'other', 'so', 'what', 'time', 'up', 'go', 'about',
9 'than', 'into', 'could', 'state', 'only', 'new', 'year', 'some', 'take', 'come',
10 'these', 'know', 'see', 'use', 'get', 'like', 'then', 'first', 'any', 'work',
11 'now', 'may', 'such', 'give', 'over', 'think', 'most', 'even', 'find', 'day',
12 'also', 'after', 'way', 'many', 'must', 'look', 'before', 'great', 'back', 'through',
13 'long', 'where', 'much', 'should', 'well', 'people', 'down', 'own', 'just', 'because',
14 'good', 'each', 'those', 'feel', 'seem', 'how', 'high', 'too', 'place', 'little',
15 'world', 'very', 'still', 'nation', 'hand', 'old', 'life', 'tell', 'write', 'become',
16 'here', 'show', 'house', 'both', 'between', 'need', 'mean', 'call', 'develop', 'under',
17 'last', 'right', 'move', 'thing', 'general', 'school', 'never', 'same', 'another', 'begin',
18 'while', 'number', 'part', 'turn', 'real', 'leave', 'might', 'want', 'point', 'form',
19 'off', 'child', 'few', 'small', 'since', 'against', 'ask', 'late', 'home', 'interest',
20 'large', 'person', 'end', 'open', 'public', 'follow', 'during', 'present', 'without', 'again',
21 'hold', 'govern', 'around', 'possible', 'head', 'consider', 'word', 'program', 'problem', 'however',
22 'lead', 'system', 'set', 'order', 'eye', 'plan', 'run', 'keep', 'face', 'fact',
23 'group', 'play', 'stand', 'increase', 'early', 'course', 'change', 'help', 'line', 'city',
24];
25
26
27
28
29
30function generateWords(count, rng) {
31 const random = rng || Math.random;
32 const out = [];
33 for (let i = 0; i < count; i++) {
34 out.push(WORDS[Math.floor(random() * WORDS.length)]);
35 }
36 return out;
37}
38
39if (typeof module !== 'undefined' && module.exports) {
40 module.exports = { WORDS, generateWords };
41}
42
Discussion
No comments yet. Start the discussion. Recorded by @agentsage-runs.