@falsejs/falsejs 1.0.2 → 1.1.0
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/README.md +3 -8
- package/aprilFoolsCalculateFalse.js +89 -7
- package/biome.json +57 -0
- package/cli/cli.js +5 -5
- package/index.d.ts +34 -35
- package/index.js +3104 -3156
- package/package.json +391 -393
- package/dofle/.last-photo +0 -1
- package/dofle/dofle.js +0 -19
- package/dofle/photos/10607915_273427569527101_1304478306_n.jpg +0 -0
- package/dofle/photos/10724032_717703524951446_2042592910_n.jpg +0 -0
- package/dofle/photos/10899508_1582361792014679_2073623926_n.jpg +0 -0
- package/dofle/photos/11203394_810705079039370_1638320906_n.jpg +0 -0
- package/dofle/photos/IMG_0001.jpg +0 -0
- package/dofle/photos/IMG_0005.jpg +0 -0
- package/dofle/photos/IMG_0009.jpg +0 -0
- package/dofle/photos/IMG_0734.jpg +0 -0
- package/dofle/photos/IMG_0805.jpg +0 -0
- package/dofle/photos/IMG_0841.jpg +0 -0
- package/dofle/photos/IMG_1136.jpg +0 -0
- package/dofle/photos/IMG_1140.jpg +0 -0
- package/dofle/photos/IMG_1832.jpg +0 -0
- package/dofle/photos/IMG_2087.jpg +0 -0
- package/dofle/photos/IMG_3139.jpg +0 -0
- package/dofle/photos/IMG_6404.jpg +0 -0
- package/dofle/photos/IMG_6594.jpg +0 -0
- package/dofle/photos/IMG_6627.jpg +0 -0
- package/dofle/photos/IMG_8443.jpg +0 -0
- package/dofle/photos/readme.md +0 -21
- package/eslint.config.mjs +0 -13
package/README.md
CHANGED
|
@@ -43,8 +43,7 @@ function False(
|
|
|
43
43
|
shouldDoSomethingAsyncWithIsTenThousand?: "yes" | "no",
|
|
44
44
|
disableAprilFoolsSideEffects?: "yes" | "no",
|
|
45
45
|
definitelyDisableAprilFoolsSideEffects?: "yes" | "no",
|
|
46
|
-
strictDisableAprilFoolsSideEffectsCheck?: "yes" | "no"
|
|
47
|
-
openRandomImageOfDofleWhenDone?: "yes" | "no"
|
|
46
|
+
strictDisableAprilFoolsSideEffectsCheck?: "yes" | "no"
|
|
48
47
|
): boolean
|
|
49
48
|
```
|
|
50
49
|
|
|
@@ -56,8 +55,6 @@ The third argument, `shouldDoSomethingAsyncWithIsTenThousand`, is whether `is-te
|
|
|
56
55
|
|
|
57
56
|
The fourth and fifth arguments, `disableAprilFoolsSideEffects` and `definitelyDisableAprilFoolsSideEffects`, can be `"yes"` or `"no"`. Both of them have to be `"yes"` to bypass the side effects of it being April Fools? What side effects, you may ask? Well, let's just say, FalseJS does something different on April Fools. If these are enabled when it's not April Fools, then an error will be thrown, unless the sixth argument, `strictDisableAprilFoolsSideEffectsCheck`, is `"no"`.
|
|
58
57
|
|
|
59
|
-
The seventh argument, `openRandomImageOfDofleWhenDone`, can be `"yes"` or `"no"`. If it is `"yes"`, then a random image of Sindre Sorhus's cat Dofle will be opened after false is calculated.
|
|
60
|
-
|
|
61
58
|
## Example
|
|
62
59
|
|
|
63
60
|
```javascript
|
|
@@ -184,8 +181,7 @@ const falseValue = falsejs.False(
|
|
|
184
181
|
"no" /*the first three options you can choose, for examples we set them all to "no"*/,
|
|
185
182
|
disableAprilFoolsSideEffects,
|
|
186
183
|
disableAprilFoolsSideEffects,
|
|
187
|
-
disableChecking
|
|
188
|
-
"no" /*this is the dofle option*/
|
|
184
|
+
disableChecking
|
|
189
185
|
)
|
|
190
186
|
|
|
191
187
|
// or you can do this, but the above is better
|
|
@@ -196,8 +192,7 @@ const falseValue = falsejs.False(
|
|
|
196
192
|
"no" /*the first three options you can choose, for examples we set them all to "no"*/,
|
|
197
193
|
"yes",
|
|
198
194
|
"yes",
|
|
199
|
-
"no"
|
|
200
|
-
"no", /*this is the dofle option*/
|
|
195
|
+
"no"
|
|
201
196
|
)
|
|
202
197
|
```
|
|
203
198
|
|
|
@@ -1,7 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/** biome-ignore-all lint/correctness/useParseIntRadix: its obfuscated bro */
|
|
2
|
+
/** biome-ignore-all lint/complexity/noCommaOperator: wth is this rule */
|
|
3
|
+
/** biome-ignore-all lint/complexity/noArguments: its obfuscated bro */
|
|
4
|
+
/** biome-ignore-all lint/suspicious/noAssignInExpressions: Its obfuscated */
|
|
5
|
+
/** biome-ignore-all lint/correctness/noNestedComponentDefinitions: Its obfuscated */
|
|
6
|
+
/** biome-ignore-all lint/correctness/noInnerDeclarations: its obfuscated bro */
|
|
7
|
+
/** biome-ignore-all lint/suspicious/noFunctionAssign: its obfuscated bro */
|
|
8
|
+
require("vanilla-javascript")
|
|
9
|
+
require("vapor-js-npm")
|
|
10
|
+
require("none")()
|
|
11
|
+
|
|
12
|
+
// Haha this code is obfuscated you'll never figure out what happens on april fools
|
|
13
|
+
|
|
14
|
+
function FalseJS_a() {
|
|
15
|
+
var e = [
|
|
16
|
+
"927560SWSajI",
|
|
17
|
+
"1683934fOhKyn",
|
|
18
|
+
"5uCPtFQ",
|
|
19
|
+
"aEOfQ",
|
|
20
|
+
(1071).toString(36).toLowerCase() +
|
|
21
|
+
(function () {
|
|
22
|
+
var e = Array.prototype.slice.call(arguments),
|
|
23
|
+
S = e.shift()
|
|
24
|
+
return e
|
|
25
|
+
.reverse()
|
|
26
|
+
.map(function (X, Z) {
|
|
27
|
+
return String.fromCharCode(X - S - 36 - Z)
|
|
28
|
+
})
|
|
29
|
+
.join("")
|
|
30
|
+
})(52, 205) +
|
|
31
|
+
(14).toString(36).toLowerCase(),
|
|
32
|
+
"Goo.",
|
|
33
|
+
"ZxwpJ",
|
|
34
|
+
"690VEBEHg",
|
|
35
|
+
"PLsAk",
|
|
36
|
+
"288306GSejYh",
|
|
37
|
+
"2274xWXqsh",
|
|
38
|
+
"10NiYrch",
|
|
39
|
+
"9045639qLltJE",
|
|
40
|
+
"3068888KtKpND",
|
|
41
|
+
"1834029kZqSqc",
|
|
42
|
+
]
|
|
43
|
+
return (
|
|
44
|
+
(FalseJS_a = function () {
|
|
45
|
+
return e
|
|
46
|
+
}),
|
|
47
|
+
FalseJS_a()
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
function FalseJS_b(e, a) {
|
|
51
|
+
var r = FalseJS_a()
|
|
52
|
+
return (
|
|
53
|
+
(FalseJS_b = function (e) {
|
|
54
|
+
e -= 220
|
|
55
|
+
var t = r[e]
|
|
56
|
+
return t
|
|
57
|
+
}),
|
|
58
|
+
FalseJS_b(e, a)
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
function FalseJS_c() {
|
|
62
|
+
var e = FalseJS_b,
|
|
63
|
+
a = {}
|
|
64
|
+
;(a[e("0xe5")] = function (e, a) {
|
|
65
|
+
return e === a
|
|
66
|
+
}),
|
|
67
|
+
(a[e("0xe0")] = e("0xe1")),
|
|
68
|
+
(a[e("0xe3")] = e("0xe2"))
|
|
69
|
+
var r = a
|
|
70
|
+
return !!r[e("0xe5")](r[e("0xe0")], e("0xe1"))
|
|
71
|
+
}
|
|
72
|
+
;(function (e, a) {
|
|
73
|
+
for (var r = FalseJS_b, t = e(); ; )
|
|
74
|
+
try {
|
|
75
|
+
var n =
|
|
76
|
+
(-parseInt(r("0xdf")) / 1) * (-parseInt(r("0xe6")) / 2) +
|
|
77
|
+
-parseInt(r("0xdc")) / 3 +
|
|
78
|
+
-parseInt(r("0xea")) / 4 +
|
|
79
|
+
(parseInt(r("0xe4")) / 5) * (-parseInt(r("0xe7")) / 6) +
|
|
80
|
+
parseInt(r("0xde")) / 7 +
|
|
81
|
+
-parseInt(r("0xdd")) / 8 +
|
|
82
|
+
(parseInt(r("0xe9")) / 9) * (parseInt(r("0xe8")) / 10)
|
|
83
|
+
if (n === a) break
|
|
84
|
+
t.push(t.shift())
|
|
85
|
+
} catch {
|
|
86
|
+
t.push(t.shift())
|
|
87
|
+
}
|
|
88
|
+
})(FalseJS_a, 419586),
|
|
89
|
+
(module.exports = FalseJS_c)
|
package/biome.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
|
|
3
|
+
|
|
4
|
+
"vcs": {
|
|
5
|
+
"enabled": true,
|
|
6
|
+
"clientKind": "git",
|
|
7
|
+
"useIgnoreFile": true
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
"files": {
|
|
11
|
+
"ignoreUnknown": false
|
|
12
|
+
},
|
|
13
|
+
"formatter": {
|
|
14
|
+
"enabled": true,
|
|
15
|
+
"formatWithErrors": false,
|
|
16
|
+
"attributePosition": "auto",
|
|
17
|
+
"indentStyle": "tab",
|
|
18
|
+
"indentWidth": 2,
|
|
19
|
+
"lineWidth": 80,
|
|
20
|
+
"lineEnding": "lf"
|
|
21
|
+
},
|
|
22
|
+
"linter": {
|
|
23
|
+
"enabled": true,
|
|
24
|
+
"rules": {
|
|
25
|
+
"recommended": true,
|
|
26
|
+
"suspicious": {
|
|
27
|
+
"noDoubleEquals": "off",
|
|
28
|
+
"noSelfCompare": "off"
|
|
29
|
+
},
|
|
30
|
+
"complexity": {
|
|
31
|
+
"useArrowFunction": "off"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"javascript": {
|
|
36
|
+
"formatter": {
|
|
37
|
+
"quoteStyle": "double",
|
|
38
|
+
"semicolons": "asNeeded",
|
|
39
|
+
"arrowParentheses": "always",
|
|
40
|
+
"bracketSpacing": true,
|
|
41
|
+
"trailingCommas": "all"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"json": {
|
|
45
|
+
"formatter": {
|
|
46
|
+
"trailingCommas": "none"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"assist": {
|
|
50
|
+
"enabled": true,
|
|
51
|
+
"actions": {
|
|
52
|
+
"source": {
|
|
53
|
+
"organizeImports": "off"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
package/cli/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const f = require("../index").default
|
|
4
|
-
|
|
5
|
-
console.log(f.False("no", "no", "no", "yes", "yes", "no", "no")) // false
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const f = require("../index").default
|
|
4
|
+
|
|
5
|
+
console.log(f.False("no", "no", "no", "yes", "yes", "no", "no")) // false
|
package/index.d.ts
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
1
|
+
/** biome-ignore-all lint/complexity/noStaticOnlyClass: BRO ITS A D.TS FILE */
|
|
2
|
+
export default class falsejs {
|
|
3
|
+
/**
|
|
4
|
+
* Returns false from the given parameters.
|
|
5
|
+
*
|
|
6
|
+
* @param {"yes"|"no"} loggingEnabled - Indicates whether logging should be enabled.
|
|
7
|
+
* @param {"yes"|"no"} shouldDoSomethingAsync - A pointless option that indicates whether something should be done asynchronously that just waits 200ms before saying "Did something async"
|
|
8
|
+
* @param {"yes"|"no"} shouldDoSomethingAsyncWithIsTenThousand - Indicates whether something should be done asynchronously when checking the self equality of 10,000 using the isTenThousand module (credits to james-work-account)
|
|
9
|
+
* @param {"yes"|"no"} disableAprilFoolsSideEffects - Indicates whether April Fools side effects should be disabled.
|
|
10
|
+
* @param {"yes"|"no"} definitelyDisableAprilFoolsSideEffects - Indicates whether April Fools side effects should be definitely disabled.
|
|
11
|
+
* @param {"yes"|"no"} strictDisableAprilFoolsSideEffectsCheck - Indicates whether strict checking for disabling April Fools side effects should be enabled.
|
|
12
|
+
* @returns {boolean} - The calculated boolean value 'false'.
|
|
13
|
+
*/
|
|
14
|
+
static False(
|
|
15
|
+
loggingEnabled?: "yes" | "no",
|
|
16
|
+
shouldDoSomethingAsync?: "yes" | "no",
|
|
17
|
+
shouldDoSomethingAsyncWithIsTenThousand?: "yes" | "no",
|
|
18
|
+
disableAprilFoolsSideEffects?: "yes" | "no",
|
|
19
|
+
definitelyDisableAprilFoolsSideEffects?: "yes" | "no",
|
|
20
|
+
strictDisableAprilFoolsSideEffectsCheck?: "yes" | "no",
|
|
21
|
+
): boolean
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Checks if a given value is false.
|
|
25
|
+
*
|
|
26
|
+
* @param {any} value - The value to be checked.
|
|
27
|
+
* @returns {boolean} - True if the value is false, false otherwise.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
static isFalse(value: any, loggingEnabled?: "yes" | "no"): boolean
|
|
31
|
+
|
|
32
|
+
static injectIntojQuery(): void
|
|
33
|
+
static expressMiddleware(req: any, res: any, next: any): void
|
|
34
|
+
}
|