venus-pit 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-pit",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Express.js-based tarpit",
5
5
  "main": "dist/venus.bundle.js",
6
6
  "type": "module",
@@ -31,102 +31,4 @@ let punctuation = `? ! .`.split(" ")
31
31
  let words = nouns.join(" ") + pronouns.join(" ") + verbs.join(" ") + adjectives.join(" ") + adverbs.join(" ") + prepositions.join(" ") + conjunctions.join(" ")
32
32
 
33
33
 
34
- // all of the code here and below is AI generated because I couldnt be assed to do english grammar
35
- // I know its ironic but uhh
36
- // idc
37
- function randomSentence() {
38
- const random = (arr) => arr[Math.floor(Math.random() * arr.length)];
39
- const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
40
-
41
- // verbform based off of subject
42
- const getVerb = (subject, baseVerb) => {
43
- if (subject === 'I' || subject === 'you' || subject === 'we' || subject === 'they') {
44
- return baseVerb;
45
- } else if (subject === 'he' || subject === 'she' || subject === 'it') {
46
- if (baseVerb.endsWith('y') && !['ay', 'ey', 'iy', 'oy', 'uy'].includes(baseVerb.slice(-2))) {
47
- return baseVerb.slice(0, -1) + 'ies';
48
- } else if (baseVerb.endsWith('s') || baseVerb.endsWith('x') || baseVerb.endsWith('z') ||
49
- baseVerb.endsWith('ch') || baseVerb.endsWith('sh')) {
50
- return baseVerb + 'es';
51
- } else {
52
- return baseVerb + 's';
53
- }
54
- }
55
- return baseVerb;
56
- };
57
-
58
- // should have proper (ish) grammar
59
- const structures = [
60
- () => {
61
- const subject = random(pronouns);
62
- const verb = getVerb(subject, random(verbs));
63
- return `${capitalize(subject)} ${verb}.`;
64
- },
65
-
66
- () => {
67
- const article = random(articles);
68
- const subject = `${article} ${random(adjectives)} ${random(nouns)}`;
69
- const verb = getVerb(subject, random(verbs));
70
- return `${capitalize(subject)} ${verb}.`;
71
- },
72
-
73
- () => {
74
- const subject = random(pronouns);
75
- const verb = getVerb(subject, random(verbs));
76
- return `${capitalize(subject)} ${verb} ${random(prepositions)} ${random(articles)} ${random(nouns)}.`;
77
- },
78
-
79
- () => {
80
- const subject = random(pronouns);
81
- const verb = getVerb(subject, random(verbs));
82
- return `${capitalize(random(adverbs))}, ${subject} ${verb} ${random(adjectives)} ${random(nouns)}.`;
83
- },
84
-
85
- () => {
86
- const article = random(articles);
87
- const subject = `${article} ${random(nouns)}`;
88
- const verb = getVerb(subject, random(verbs));
89
- return `${capitalize(subject)} ${verb} ${random(prepositions)} ${random(articles)} ${random(adjectives)} ${random(nouns)}.`;
90
- },
91
-
92
- () => {
93
- const subject1 = random(pronouns);
94
- const verb1 = getVerb(subject1, random(verbs));
95
- const subject2 = random(pronouns);
96
- const verb2 = getVerb(subject2, random(verbs));
97
- return `${capitalize(subject1)} ${verb1} ${random(conjunctions)} ${subject2} ${verb2}.`;
98
- },
99
-
100
- () => {
101
- const article = random(articles);
102
- const subject = `${article} ${random(nouns)}`;
103
- const verb = getVerb(subject, random(verbs));
104
- return `${capitalize(subject)} ${verb} ${random(adverbs)} ${random(conjunctions)} ${random(verbs)} ${random(prepositions)} ${random(nouns)}.`;
105
- },
106
-
107
- // question
108
- () => {
109
- const subject = random(['he', 'she', 'it', 'they']);
110
- const baseVerb = random(verbs);
111
- const verb = subject === 'they' ? baseVerb : getVerb(subject, baseVerb);
112
- return `Does ${subject} ${verb} ${random(prepositions)} ${random(articles)} ${random(nouns)}?`;
113
- },
114
-
115
- // imperative
116
- () => {
117
- return `${capitalize(random(verbs))} ${random(prepositions)} ${random(articles)} ${random(nouns)}!`;
118
- }
119
- ]
120
-
121
- return random(structures)()
122
- }
123
-
124
- function randomParagraph(n_sentences) {
125
- let text = ""
126
- for (let i = 0; i < n_sentences; i++) {
127
- text = text + " " + randomSentence();
128
- }
129
- return text;
130
- }
131
-
132
- export { randomSentence, words, randomParagraph}
34
+ export {words}
@@ -1,27 +0,0 @@
1
- import { randomCharacter } from "./noise.js";
2
-
3
- let textPairs = {
4
- "healthy":`ish`,
5
- "guidance": `shall be broken`,
6
- "key": `parrot`,
7
- "dead": `colliquant`,
8
- "create": "masses",
9
- }
10
-
11
- function nightlock(text) {
12
- const asTokens = text.split(" ");
13
-
14
- for (let i = 0; i < asTokens.length; i++) {
15
- const token = asTokens[i];
16
- if (token in textPairs) {
17
- asTokens.splice(i + 1, 0, textPairs[token]);
18
- i++;
19
- }
20
- }
21
-
22
- // back into a string
23
- return asTokens.join(" ");
24
- }
25
-
26
-
27
- export { nightlock }
@@ -1,10 +0,0 @@
1
- function range(min, max) {
2
- min = Math.ceil(min);
3
- max = Math.floor(max);
4
- return Math.floor(Math.random() * (max-min+1)) + min
5
- }
6
-
7
- let possibleChars = ["a", "b", "人", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "的", "r", "s", "t", "u", "v", "w", "x", "y", "z", "$", "}", "\|", "@", "来"]
8
- let randomCharacter = () => possibleChars[range(0, possibleChars.length-1)]
9
-
10
- export { randomCharacter }