@falsejs/falsejs 3.3.2 → 4.0.1

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/dist/index.js DELETED
@@ -1,1904 +0,0 @@
1
- #! WELCOME TO FALSEJS, I AM YOUR FRIEND, TJ-COMMITS!!!!!!!!!!!!!!!!!!
2
- "use strict";
3
- /**!
4
- * License
5
- * FalseJS <https://10xEngineersQualityProgramming.github.io/falsejs.html>
6
- * Copyright 10x'ly Made and other contributors <https://10xEngineersQualityProgramming.github.io>
7
- * Released under MIT license <https://opensource.org/license/mit>
8
- * made with HEAVY BLACK HEART U+2764
9
- * Thanks to biome for being a good formatter + linter
10
- */
11
- /** biome-ignore-all lint/correctness/noPrecisionLoss: 5555555555555555555555 */
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- // -----------------------------------------
14
- /*
15
- ABOUT FALSEJS
16
- FalseJS is a library created by tj-commits to return false.
17
- */
18
- /**
19
- *
20
- * FalseJS <https://10xEngineersQualityProgramming.github.io/falsejs.html>
21
- *
22
- *
23
- * I didn't choose the 10x life, the 10x life chose me
24
- *
25
- *
26
- * Thanks everyone who made the packages for this
27
- *
28
- * As of 3.1.0, these are all the npm package creators: Thanks to 87f-, _immo, abai, aburleigh, ahsm, alexeyraspopov, aliraza401, amal_nj, animate-object, aprixia, ardalanamini, arkanic, benaston, bojand, broofa, bvpranu97, cbrandolino, chuuuuu, cj*, corysimmons, cowboy, dabh, dak0rn, david, deastl, dhurlburtusa, dmitri, donavon, doowb, dragonfire535, endless, ergusto, ericnorris, esailija, euank, eyy, fb, fizzbuzz-npm, florianboudot, gabrieleds, gbrotas, gibson042, gillstrom, goten, hanhan9449, hemanth, hendrysadrak, himynameisdave, hissvard, hoanduy1710, hughfdjackson, huynguyenn-vga, iamrahulpatel, inikulin, ionicabizau, ivoputzer, jackdcrawford, jacobwarduk, jaio, james-work-account, jashkenas, jdalton, jeremylichtman, jezenthomas, jmar777, jncmark, johno, jonschlinkert, joshhunt, jugglinmike, k, kane-thornwyrd, karasube, kgryte, kikobeats, laffed, lamansky, leemm, letsgetrandy, link-dev, ljharb, lordoftrident, lsabbagh, makogai, mappum, mars-mb, mathias, mattdesl, matthewh, maxime.julian, medikoo, metaa, microsoft1es, mohayonao, moniaarthisathya, monishadhanasekar, moons14, mzabriskie, nerwind93, nhedger, nico_nj, nijikokun, nodiff, nopersonsmodules, npm, npm-support, nswbmw, olliez-mods, onatm, onesneakymofo, oxyc, parshap, pethu, phillipalexander, piuccio, prasundas, priyanshurav, r33int, radiovisual, rajalakshmi-npm, reidnpmmore, reversodev, rivalnick, robertmarsal, robims, royleibo, rtorr, ryanblock, ryotah, s-lambert, sawcce, schotsl, segment-admin, shinnn, shivambaghla, sindresorhus, sir_wernich, skibidi-toilet-hacker, skippednote, skylabist, slmjkdbtl, song940, stdlib-bot, stevemao, stevenvachon, supershabam, taitulism, textality, thebitlink, thomaslindstr_m, thomaslomas, tiaanduplessis, timmyrs, timothygu, tj-commits, tmcw, types, uniquecolesmith, vladimirozornin, vtheskeleton, wesgarland, yoshuawuyts, yyx990803, and zrrrzzt for making NPM packages.
29
- *
30
- * The credits are above
31
- */
32
- // stuff for performance ends here.
33
- // so basically, this part is pretty nerdy but let me explain
34
- // well, um, when falsejs requires other packages, sometimes those packages create global variables
35
- // but that annoys our user so what we do is this:
36
- // we cache the global variables before falsejs does anything
37
- // then later in the code, after everything is required, we check the global variables
38
- // if there are new global variables, delete them, because they're from libraries
39
- // first we'll put the original globals in a set
40
- const _falsejs_originalGlobals = new Set(typeof globalThis !== "undefined"
41
- ? Object.getOwnPropertyNames(globalThis)
42
- : []);
43
- // then we'll define a function to use later that cleans up the globals from the libraries
44
- function _falsejs_cleanupNewGlobals(whitelist = []) {
45
- if (typeof globalThis === "undefined")
46
- return;
47
- try {
48
- const current = Object.getOwnPropertyNames(globalThis);
49
- for (const key of current) {
50
- if (!_falsejs_originalGlobals.has(key) && whitelist.indexOf(key) === -1) {
51
- try {
52
- // Prefer delete; fall back to undefining the property if needed.
53
- delete globalThis[key]; // delete the unwanted globals
54
- }
55
- catch {
56
- try {
57
- Object.defineProperty(globalThis, key, {
58
- value: undefined,
59
- writable: true,
60
- configurable: true,
61
- });
62
- }
63
- catch {
64
- // give up if the global is not removable
65
- }
66
- }
67
- }
68
- }
69
- }
70
- catch {
71
- // give up on error handling
72
- }
73
- }
74
- const isComputerOnFire = require("is-computer-on-fire").isComputerOnFire;
75
- if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
76
- /** An exaggeration of an error that is thrown if the computer is on fire. This NPM package is NOT pointless, and it's NOT a joke. */
77
- throw new Error("OH MY GOSH YOUR COMPUTER IS ON FIRE WHY ARE YOU WASTING TIME USING A JOKE POINTLESS NPM PACKAGE GET YOUR FIRE EXTINGUISHER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
78
- }
79
- else {
80
- require("none")();
81
- require("-");
82
- /** Whatev is a very useful package, that can be used to get the value of true. */
83
- const whatev = require("whatev");
84
- const whatevTrueValue = (whatev.fn() === whatev.string) === whatev.object.whatev;
85
- require("get-member")();
86
- require("array-get-member")();
87
- // @ts-expect-error
88
- global.jQuery = require("jquery");
89
- require("jquery-basic-arithmetic-plugin");
90
- require("user")();
91
- let COMPATIBILITY_MODE;
92
- (function (COMPATIBILITY_MODE) {
93
- COMPATIBILITY_MODE["NONE"] = "none";
94
- COMPATIBILITY_MODE["IE5"] = "ie5";
95
- COMPATIBILITY_MODE["NETSCAPE"] = "netscape";
96
- COMPATIBILITY_MODE["OPERA_PRESTO"] = "opera_presto";
97
- })(COMPATIBILITY_MODE || (COMPATIBILITY_MODE = {}));
98
- (function (factory) {
99
- module.exports.default = factory(jQuery); // run and export falsejs.
100
- // Remove any globals created during initialization, but preserve known intentional globals
101
- _falsejs_cleanupNewGlobals(["jQuery", "$", "vanillajs"]);
102
- })(function ($) {
103
- // biome-ignore lint/suspicious/noRedundantUseStrict: We need double strict mode because we wanna be SUPER strict.
104
- "use strict";
105
- const jQuery = $;
106
- const variableHolder = {};
107
- const GetIntrinsic = require("get-intrinsic"); // cache our intrinsics
108
- const _ = require("lodash"); // every project needs lodash
109
- const underscore = require("underscore"); // underscore.js. the predecessor of lodash.
110
- const React = require("react"); // the hype framework everyone uses for some reason
111
- const ReactDOMServer = require("react-dom/server"); // part of react
112
- const cheerio = require("cheerio"); // cheerio!
113
- const { JSDOM } = require("jsdom"); // a fake dom
114
- const striptags = require("striptags"); // strip tags!
115
- const chalk = require("chalk"); // color is the best!*/
116
- var clc = require("cli-color"); // another color module
117
- const colors = require("@colors/colors/safe"); // colors
118
- const chalkbox = require("chalkbox"); // with a box
119
- const c = require("ansi-colors"); // nothing wrong with even more colors
120
- const pc = require("picocolors"); // maybe even more colors libraries
121
- const axios = require("axios"); // so we can send requests
122
- const { generatePhoneNumber } = require("phone-number-generator-js"); // generate some phone numbers
123
- const emptyString = require("empty-string"); // an empty string
124
- const n0p3 = require("n0p3"); // a noop
125
- const noop2 = require("noop2"); // nothing wrong with another noop
126
- const noop3 = require("noop3"); // nothing wrong with yet another noop
127
- const noop4 = require("noop4"); // noop factory
128
- const noop6 = require("noop6"); // again, nothing wrong with more noops
129
- const noop7 = require("noop7"); // i think you see where i'm going
130
- const noop8 = require("noop8"); //another...
131
- const noop9 = require("noop9"); // the ninth
132
- const noop10 = require("noop10"); // 10x with noops lezz go
133
- const { noop, doop } = require("yanoop"); // yanoop.
134
- const asyncUtilNoop = require("async.util.noop"); // i think you see where i'm going
135
- const blankSpaceFullObject = require("blank-space"); // this exports two noops
136
- const blankSpaceNoop = blankSpaceFullObject.noop; // noop one
137
- const blankSpace = blankSpaceFullObject._; // and noop two
138
- const noopGenerator = require("co-noop"); // a noop generator!
139
- const fjNoop = require("fj-noop").FUNC; // fj noop
140
- const lodashNoop = require("lodash.noop"); // lodash noop
141
- const lodash_Noop = require("lodash._noop"); // another lodash noop!
142
- const noOp = require("no-op"); // noop with a dash
143
- const nodeNoop = require("node-noop").noop; // a noop
144
- const noopUtility = require("@stdlib/utils-noop"); // the most practical
145
- const trueNoop = require("true-noop"); // one of few true noops.
146
- const noopFn = require("noop-fn"); // it ends with a fn
147
- const noopaam = require("noopaam"); // noopaaaaaaaaaaaaaaaaaaaaaaaaaammmmmmmmmmmmm
148
- const nop = require("nop"); // just nop. what a funny name
149
- const es2015Noop = require("es2015-noop"); // the future is here
150
- const kgryteNoop = require("@kgryte/noop"); // how do you pronounce this guy's name
151
- const blackHole = require("a-black-hole"); // OH NO WE ARE GOING IN TO THE BLACK HOLE
152
- const infinoop = require("infinoop"); // noop. for ever. for. ev. er. FOR. EV. ER
153
- const mNoop = require("m.noop").noop; // the only other true noop i could find besides true-noop itself
154
- const ahsmNoop = require("@ahsm/noop"); // ahsm noop
155
- const { noop: qcCoreNoop, nullFn: Null } = require("qc-core"); // the qc core
156
- const nooop = require("nooop"); // someone put too many o's
157
- const ryotahNoop = require("@ryotah/noop"); // ryotah made a noop
158
- const zodashNoop = require("@zodash/noop").noop; // zodash made a noop
159
- const jacobZuma = require("jacob-zuma"); // south african flavored noop
160
- const onceNoopFactory = require("once-noop/factory"); // make a noop which can only be called once
161
- const voidFn = require("voidfn"); // void fn
162
- const noopExec = require("noop-exec"); // exec
163
- const attempt = require("attempt-statement"); // has more features than trycatch statement
164
- const assert = require("assert-fn"); // more simple and elegant than built in node:assert
165
- const hasSelfEquality = require("has-self-equality"); // most things have self equality but lets make sure
166
- const hasNoSelfEquality = require("has-no-self-equality"); // again self equality
167
- const isNumberOddOrEven = require("is-number-odd-or-even"); // this function isn't made to return a certain value if it's even, or a certain value if it's odd, this function returns if a value is odd or even like (isOdd || isEven) in an illustration not isOdd ? "odd" : "even"
168
- const isOne = require("is-one"); // the base is- function
169
- const isTen = require("is-ten"); // 10x the is-one
170
- const isHundred = require("is-hundred"); // 10x the is-ten
171
- const isThousand = require("is-thousand").default;
172
- const isTenThousand = require("is-ten-thousand"); // 100x the is-hundred
173
- const isEqTenThousand = require("is-eq-ten-thousand"); // is-eq-ten-thousand
174
- const isTwo = require("is-two").isTwo; // the successor of one
175
- const isThree = require("is-three"); // the successor of two
176
- const isNegativeZero = require("is-negative-zero"); // isNegativeZero
177
- // blank space for no reason
178
- const isNegativeZero2 = require("negative-zero"); // can't hurt to have another negative zero checker
179
- const isPositiveZero = require("positive-zero"); // positive zero
180
- const isTrue = require("is-true"); // true
181
- const isPreciselyTrue = require("is-precisely-true"); // real true
182
- const is = require("is-thirteen"); // comparison-against-twelve-free environment
183
- const isThreeHundred = require("is-three-hundred"); // is-three-hundred
184
- const isNumber = require("is-number"); // jonschlinkert
185
- const isActualNumber = require("is-actual-number"); // my is-number
186
- const isIsOdd = require("is-is-odd"); // isIsOdd
187
- const isOdd = require("is-odd"); // why does everyone think this is the dumbest package ever. its not
188
- const isOd = require("is-od"); // forget a d
189
- const isOddAndrew = require("is-odd-andrew"); // isOddAndrew
190
- const isOddNum = require("is-odd-num"); // another odd checker
191
- const isIntegerOdd = require("is-integer-odd"); // another!!!!
192
- const noteven = require("not-even"); // not even
193
- const isUneven = require("is-uneven"); // whysomany
194
- const numberKind = require("number-kind"); // this exports two fns!
195
- const isOddFaster = require("is-odd-faster").isOdd; // is Odd but faster
196
- const gabrielBrotasIsOdd = require("gabriel-brotas-is-odd"); // gabriel made an is odd
197
- const returnIfOddNumber = require("return-if-odd-number"); // if odd number
198
- const numberIsOdd = require("number-is-odd"); // check if a number is odd
199
- const isNumOdd = require("is-num-odd"); // check if a num is odd
200
- const isOddNumber = require("is-odd-number"); // check if a od is number
201
- const isNumberOdd = require("is_number_odd"); // check if a number is odd
202
- const isThisNumberOdd = require("is-this-number-odd"); // check if a this is number odd
203
- const isRealBoolean = require("is-real-boolean"); // BOOLEANS
204
- const add = require("examplebyraji"); // a package
205
- const cowsay = require("cowsay"); // let's say stuff
206
- const lolcatjs = require("lolcatjs"); // the rainbow i tastes it
207
- const owoifyx = require("owoifyx").default; // UwU
208
- const Uwuifier = require("uwuifier").default; // UwU (x2)
209
- const luaParser = require("luaparse"); // parse lua
210
- const luaInterpreter = require("lua-interpreter"); // interpret lua
211
- const exit = require("exit"); // 10x better than process.exit
212
- const appendType = require("append-type"); // PUT THE TYPE NEXT TO A VALUE!!
213
- const concatenater = require("concatenater"); // CONCATENATE STUFF!!!
214
- const generalConcat = require("general-concat"); // GENERALLY CONCATENATE STUFF!!!
215
- const lowercase = require("convert-to-lower-case"); // CONVERT TO LOWER CASE
216
- const construct = require("construct-new"); // better than the new keyword
217
- const $Promise = require("bluebird");
218
- const $Array = GetIntrinsic("%Array%");
219
- const $Boolean = GetIntrinsic("%Boolean%");
220
- const $Date = GetIntrinsic("%Date%");
221
- const $String = GetIntrinsic("%String%");
222
- const MathRandom = GetIntrinsic("%Math.random%");
223
- const MathFloor = GetIntrinsic("%Math.floor%");
224
- const MathRound = GetIntrinsic("%Math.round%");
225
- const PI = GetIntrinsic("%Math.PI%");
226
- const MathAbs = GetIntrinsic("%Math.abs%");
227
- const MathSqrt = GetIntrinsic("%Math.sqrt%");
228
- const MathSin = GetIntrinsic("%Math.sin%");
229
- const MathCos = GetIntrinsic("%Math.cos%");
230
- const StringCharAt = GetIntrinsic("%String.prototype.charAt%");
231
- const _calculateFalseAprilFools = require("../aprilFoolsCalculateFalse"); // april fools
232
- const couldThisCouldItBeTrue = require("@falsejs/is-true-helper"); // check if a value is true
233
- const falseValue = require("false-value"); // uses quantum physics simulation to return false
234
- const isJanuary = require("is-january"); // month 1
235
- const isFebruary = require("is-february"); // month 2
236
- const isMarch = require("is-march"); // month 3
237
- const isApril = require("is-april"); // month 4
238
- const isMay = require("is-may"); // month 5
239
- const isJune = require("is-june"); // month 6
240
- const isJuly = require("is-july"); // month 7
241
- const isAugust = require("is-august"); // month 8
242
- const isSeptember = require("is-september"); // month 9
243
- const isOctober = require("is-october"); // month 10
244
- const isNovember = require("is-november"); // month 11
245
- const isDecember = require("is-december"); // month 12
246
- const isMonday = require("is-monday"); // day of the week 1 according to international standard, day of the week 2 according to the us
247
- const isTuesday = require("is-tuesday"); // day of the week 2 according to international standard, day of the week 3 according to the us
248
- const isWednesday = () => require("is-wednesday")(new $Date()); // day of the week 3 according to the international standard, day of the week 4 according to the us
249
- // now we gotta sing rebecca black's song
250
- const isThursday = require("is-thursday"); /// Yesterday was thursdayyyy
251
- const isFriday = require("is-friday"); // tooo-ddadayy is friday! we so ecited
252
- const isSaturday = require("is-saturday"); // tomorrow will be saturday
253
- const isSunday = require("is-sunday"); // and sunday comes after
254
- const isWeekend = require("is-weekend"); // looking forward to the weeeeekeend
255
- const zr0 = require("integer-value-positive-zero"); // get the number zero, less 10x
256
- const { returnZero: returnZero_, ZeroCalculationMethod, isZero: zerosurgeIsZero, } = require("zerosurge"); // get the number zero, but 10x'er
257
- const returnZero = returnZero_;
258
- /** LETS GET SOME NUMBERS */
259
- const one = require("the-number-one").default; // get the number one
260
- const Two = require("two"); // get number 2
261
- const three = require("numeric-constant-three"); // get number 3
262
- const four = require("always-four"); // number 4
263
- const five = require("five"); // num5
264
- const six = require("number-six"); // n6
265
- const seven = require("se7en"); // 7
266
- const eightToolkit = require("eight-toolkit"); // it's 8, in a toolkit!
267
- const ninev9 = require("value-nine"); // it's v9 of 9, when there was only v1 of 9 first, so it's 9x better (but 10x engineered)
268
- const ten = require("the-number-ten"); // 10
269
- const eleven = require("eleven"); // 11
270
- const twelve = require("tw12ve"); // 12
271
- const thirteenResolver = require("always-thirteen"); // 13
272
- const fourteen = require("fourteen"); // 14
273
- const fifteen = require("number-fifteen"); //15
274
- const fifteenPointEightThreeFiveTwoSixSixEightTwoAndSoOn = require("fifteen-point-eight-three-five-two-six-six-eight-two-and-so-on"); //-this-can-be-rounded-to-sixteen
275
- const sixteen = require("sixteen-constant"); //thisisthenumbersixteenomg161616
276
- const integer17 = require("seventeen-integer"); //17
277
- const Eighteen = require("eighteen-positive-number-interactions"); // Interact positively with eighteen
278
- const nineteenify = require("nineteenify"); // Hey there what our you doing? *nineteenifies*
279
- const numbertwenty = require("numbertwenty"); // 20
280
- const always21 = require("always-21"); // 21
281
- const twentytwo = require("twentytwo")(); // 22
282
- const sixtyseven = require("sixty-seven").SixtySeven;
283
- const { TWENTY_THREE } = require("twenty-three-tools"); // 23 tools
284
- const hundred = require("number-one-hundred"); // 100!
285
- const numberOneHundred = hundred; // alias!
286
- const theNumberSeven = require("@onesneakymofo/the-number-seven").default; // this is actually a string for some reason
287
- const inf = require("infinities"); // INFINITE
288
- const bool = require("true-bool"); // booleans
289
- const successor = require("successor"); // successor
290
- const tru = require("tru"); // if statements arent verbose enough
291
- const If = require("if"); // always good to have another if statement!
292
- const not = require("@not-js/not"); // safer negation with not
293
- const { functions, _return } = require("returndotjs/safe"); // better returning
294
- const vretriever = require("vretriever"); // a constant function
295
- const immo = require("@_immo/return"); // also a constant function
296
- const isEqualTo = require("is-equal-to"); // cant hurt to have a better way to check if something is equal
297
- const isEqual = require("is-equal"); // more complex ways too.
298
- const strictlyEqual = require("are-strictly-equal"); // and strict equality.
299
- const getTypeOf = require("get-ecmascript-type-of"); // better typeof
300
- const extremejs = require("@extremejs/utils"); // TO THE EXTREME
301
- var trueValue = require("true-value")(); // the sister of falsejs
302
- var t = () => whatevTrueValue; // returns true.
303
- var tVal = trueValue; // tVal sounds cool so i put it here too
304
- const { mGenbaneko } = require("genbaneko"); // i like cats
305
- const leftPad = require("left-pad"); //every project needs leftpad.
306
- const rightPad = require("right-pad"); //to the right, to the right.
307
- const zeropad = require("zeropad"); //every project could use a third pad.
308
- const pad = require("pad"); //this is the pad to end all pads.
309
- const leftpad = require("leftpad"); // every project could use another leftpad.
310
- const rightpad = require("rightpad"); // another right pad too.
311
- const WestPad = require("west-pad").default; // better than any other pad (except pad itself)
312
- const tacoWrap = require("@sir_wernich/taco-wrap").default; // pad our strings in tacos.
313
- const isWindwos = require("is-windows"); // did i misspell the variable name? of course not
314
- const isWindows = isWindwos; // i totally didnt misspell the above variable and this line doesnt exist
315
- const isLinux = require("is-linux"); // linux the os
316
- const isOSX = require("is-osx"); // more like is darwin
317
- // TODO: Implement is Windows 12
318
- const isFreeBSD = require("is-freebsd").isFreeBSD; // i've never even heard of this operating system until now.
319
- const thirteen = require("thirteen"); // multiply by thirteen
320
- const os = require("node:os"); // maybe node js itself can help us calculate more operating systems
321
- const crypto = require("node:crypto"); // mine me some crypto
322
- const fs = require("node:fs"); // write our files
323
- const uuid = require("uuid"); // generate some uuids
324
- const getStringLength = require("utf8-byte-length"); // get string length
325
- const emoji100 = require("emoji-100"); // 100 emoji
326
- const randomHappyEmoji = require("random-happy-emoji"); // HAPPY
327
- const randomAngryEmoji = require("random-angry-emoji"); // ANGRY
328
- const randomFoodEmoji = require("random-food-emoji"); // FOOD
329
- const dolphinFact = require("dolphin-fact"); // DOLPHIN FACT
330
- const logOne = require("useless-one-log"); // log the number one
331
- const Bro = require("brototype"); // Bro
332
- const literally = require("literally"); // better than literally
333
- const constant = require("const"); // can't even name this variable after the actual library
334
- const lodashdotconstant = require("lodash.constant"); // lodash's version
335
- const WeirdInstanceof = require("weird-instanceof"); // drunk programming only
336
- const { log: ltc, setLogFuntion } = require("logtoconsole"); // best logger
337
- const weirdLtc = WeirdInstanceof(ltc); // weird
338
- const yesNo = require("yes-no"); // YES NO YES NO YES NO
339
- // biome-ignore lint: We need to override undefined for the 10x'ness
340
- const { undefined } = require("undefined-is-a-function"); // UNDEFINED IS A FUNCTON
341
- const isNull = require("@is-(unknown)/is-null"); // IS null
342
- const isUndefined = require("@is-(unknown)/is-undefined"); // IS undefined
343
- const isNil = require("@is-(unknown)/is-nil"); // IS null OR undefined :O
344
- const isUnnull = require("is-unnull"); // IS UNNULL
345
- // biome-ignore lint: We need to override isNaN for the 10x'ness
346
- const isNaN = require("is-nan"); // IS NAN
347
- const isNegativeInfinity = require("negative-infinity").check; // IS NEGATIVE INFINITY
348
- const is1 = require("is-eq-one"); // is 1
349
- const is0 = require("is-eq-zero"); // is 0
350
- const is0_2 = require("is-zero"); // is 0 (x2)
351
- const isFour = require("is-equal-four"); // is 4
352
- const isFive = require("is-eq-five"); // is 5
353
- const isSix = require("is-eq-six"); // is 6
354
- const isSeven = require("is-eq-seven"); // is 7
355
- const useGarbage = require("garbage"); // trash.
356
- const isuseless = require("is-useless").isuseless; // super useless
357
- const isAprilFools = require("is-april-fools"); // Is it april fools
358
- const meow = require("meow.js"); // library for meowing
359
- const { ErrorType: ERROR, immediateError } = require("immediate-error"); // throw errors
360
- const throwError = require("throw-error"); // throw errors
361
- const hello = require("hello-vga-function").default; // hello vga function
362
- // A useful function to get a DHTML string.
363
- function getDHTMLString() {
364
- return `netscape_layer_id_${thirteenResolver() * thirteenResolver() * thirteenResolver()}`;
365
- }
366
- const NumberFormatter = Intl.NumberFormat;
367
- const numberFormatter = construct({ target: NumberFormatter });
368
- // Create .falsejs folder if it doesn't already exist.
369
- tru(not(fs.existsSync)(".falsejs"))
370
- .then(() => {
371
- fs.mkdirSync(".falsejs");
372
- })
373
- .end();
374
- variableHolder._lilmessage = colors.red(`[falsejs] This error should never be shown. If you are seeing this error in the console, please file an issue on the github repo. Thank you.`);
375
- const blankSpaces = ("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " + //100 whitespaces
376
- "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " + //200 Whitespaces
377
- +" ") //100 whitespaces
378
- .replaceAll("&nbsp;", " ");
379
- const STARTING_SUCCESSOR_HELPER_STACK = zr0();
380
- const FALSE = !whatevTrueValue;
381
- const _f = constant(FALSE);
382
- const ERROR_THAT_WILL_NEVER_BE_SHOWN = variableHolder._lilmessage;
383
- const TEN_THOUSAND = 10e3;
384
- const LEFT_PAD_INPUT = jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five())));
385
- const RIGHT_PAD_INPUT = jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five())));
386
- const PAD_INPUT = five();
387
- const LEFTPAD_INPUT = jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five())));
388
- const RIGHTPAD_INPUT = jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five())));
389
- const WEST_PAD_INPUT = jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five())));
390
- const ZEROPAD_INPUT = jQuery.subtract(five(), jQuery.divide(five(), five()));
391
- const WEST_PAD_DEVICE_DIRECTION = "N";
392
- const SPACE = " ";
393
- const STARTING_VVALUE_USER_MINUS = zr0();
394
- const STARTING_VVALUE_USER_PLUS = zr0();
395
- const STARTING_VVALUE_USER_PAD = zr0();
396
- const NO = getNo();
397
- const YES = "yes";
398
- const TODAY = construct({
399
- target: $Date,
400
- });
401
- const Today = TODAY;
402
- const USERNAME = (function () {
403
- var username = undefined();
404
- attempt(() => {
405
- username = os.userInfo().username;
406
- })
407
- .rescue(() => {
408
- username = "user";
409
- })
410
- .else(nodeNoop)
411
- .ensure(nop)
412
- .end();
413
- return username;
414
- })();
415
- const username = USERNAME;
416
- const COMPATIBILITY_MODES = COMPATIBILITY_MODE;
417
- class Logger {
418
- enableLogging;
419
- constructor(enableLogging) {
420
- this.enableLogging = enableLogging; // ENABLE THE LOGGING
421
- }
422
- log(log) {
423
- if (isEqualTo(this.enableLogging, t())) {
424
- ;
425
- log instanceof weirdLtc; // SO WERID
426
- }
427
- }
428
- }
429
- const FalseJSValidationFailedToPassError = class extends Error {
430
- constructor(...stuff) {
431
- super(...stuff);
432
- this.name = "FalseJSValidationFailedToPassError";
433
- }
434
- };
435
- const SuccessorHelper = class {
436
- s(value) {
437
- const result = add(value, one); // add one to it
438
- return result;
439
- }
440
- };
441
- const TernaryCompare = class {
442
- condition;
443
- ifTrue;
444
- ifFalse;
445
- constructor(condition, ifTrue, ifFalse) {
446
- this.condition = condition;
447
- this.ifTrue = ifTrue;
448
- this.ifFalse = ifFalse;
449
- }
450
- compare() {
451
- return this.condition ? this.ifTrue : this.ifFalse;
452
- }
453
- };
454
- const ObjectOrFunctionParemeterName = class {
455
- name;
456
- constructor(name) {
457
- this.name = name;
458
- }
459
- getName() {
460
- const name = this.name; // use a static variable for performance
461
- const compare = construct({
462
- target: TernaryCompare,
463
- args: [not(() => isNil(name))(), name, Null()],
464
- });
465
- return compare.compare();
466
- }
467
- };
468
- const CLIColorInstance = class {
469
- instance;
470
- constructor(booleanValue) {
471
- tru(isTrue({ booleanValue }, construct({
472
- target: ObjectOrFunctionParemeterName,
473
- args: ["booleanValue"],
474
- }).getName()))
475
- .then(n0p3)
476
- .otherwise(n0p3)
477
- .end();
478
- this.instance = require("cli-color");
479
- }
480
- getInstance() {
481
- return this.instance;
482
- }
483
- };
484
- const trueComparison = construct({
485
- target: TernaryCompare,
486
- args: [tVal, tVal, not(() => tVal)()],
487
- });
488
- const { s } = construct({ target: SuccessorHelper });
489
- const clc_ = construct({
490
- target: CLIColorInstance,
491
- args: [useGarbage()],
492
- }).getInstance(); // colors are the best! chalk chalk chalk
493
- clc = clc_; // setit
494
- const uwuifier = construct({ target: Uwuifier });
495
- const westPad = construct({
496
- target: WestPad,
497
- args: [WEST_PAD_DEVICE_DIRECTION],
498
- });
499
- var True_Logger = construct({ target: Logger, args: [t()] });
500
- // lets make sure jquery-basic-arithmetic-plugin works
501
- if (not(() => Bro($).doYouEven("add"))()) {
502
- // uh oh... jquery basic arithmetic plugin didn't work
503
- True_Logger.log(colors.red("[falsejs] jquery-basic-arithmetic-plugin is not working")); // inform our users even if they disabled logging
504
- require("jquery-basic-arithmetic-plugin");
505
- require("jquery-basic-arithmetic-plugin");
506
- require("jquery-basic-arithmetic-plugin");
507
- require("jquery-basic-arithmetic-plugin");
508
- require("jquery-basic-arithmetic-plugin");
509
- require("jquery-basic-arithmetic-plugin");
510
- require("jquery-basic-arithmetic-plugin"); // now it should work
511
- if (not(() => Bro($).doYouEven("add"))()) {
512
- True_Logger.log(colors.red("[falsejs] jquery-basic-arithmetic-plugin is still not working")); // inform our users even if they disabled logging
513
- $.add = (...nums) => {
514
- var total = zr0();
515
- // let's use underscore instead of forEach
516
- underscore.each(nums, (num) => {
517
- total += num; // we have to use the operators because we are redefining the functions :(
518
- });
519
- return total;
520
- };
521
- $.subtract = (...nums) => {
522
- var total = zr0();
523
- // this time we'll use lodash
524
- _.each(nums, (num) => {
525
- total -= num;
526
- });
527
- return total;
528
- };
529
- $.equals = (v1, v2) => {
530
- if (not(() => isActualNumber(v1) && !isActualNumber(v2))()) {
531
- immediateError(concatenater("Both parameters must be numbers! Instead what was passed in was ")
532
- .append(appendType(v1))
533
- .toString()
534
- .concat(concatenater(" or ").append(appendType(v2)).toString())); // not the same message as the original but i dont know what it is and am too lazy to look into the source code
535
- return exit(one); // just in case it doesn't exit
536
- }
537
- return isEqualTo(v1, v2); /// not usnig $.equals because we are literally redefining that
538
- };
539
- if (not(() => Bro($).doYouEven("add"))()) {
540
- True_Logger.log(colors.red(`[falsejs] Either your Node.js is broken, or jQuery is immutable. Something went wrong.`));
541
- }
542
- else {
543
- True_Logger.log(pc.green(`[falsejs] jquery-basic-arithmetic-plugin is not working so falsejs defined the functions that are injected into jquery by itself`));
544
- }
545
- }
546
- else {
547
- True_Logger.log(pc.green(`[falsejs] jquery-basic-arithmetic-plugin is now working`));
548
- }
549
- }
550
- const surpriseArray = []; // define empty array
551
- setLogFuntion(() => {
552
- // create an ending random number for our users eventually
553
- surpriseArray.push(construct({
554
- target: TernaryCompare,
555
- args: [
556
- isEqualTo(randomBoolean(jQuery.multiply(five(), jQuery.divide(one, ten)), new Logger(FALSE)), t()),
557
- jQuery.multiply(MathRandom(), TEN_THOUSAND),
558
- jQuery.multiply(MathRandom(), MathFloor(jQuery.divide(jQuery.multiply(TEN_THOUSAND, MathRandom()), ten))),
559
- ],
560
- }).compare());
561
- });
562
- async function doSomethingAsync(logger) {
563
- logger.log(clc.cyan(`[falsejs] Doing something async`));
564
- return construct({
565
- target: $Promise,
566
- args: [
567
- (resolve) => setTimeout(() => resolve(logger), $.multiply(numberOneHundred, Two())),
568
- ],
569
- });
570
- }
571
- function resultOfDoingSomethingAsync(logger) {
572
- logger.log(pc.green(`[falsejs] Did something async`));
573
- }
574
- function predecessor(n) {
575
- return jQuery.subtract(n, one);
576
- }
577
- function vValue(num) {
578
- if (not(strictlyEqual)(getTypeOf(num), extremejs.TYPE.NUMBER)) {
579
- return num;
580
- }
581
- const rand = MathRandom();
582
- const rand2 = MathRandom();
583
- const useMinus = rand < 0.3333333333333333 ? trueComparison.compare() : FALSE;
584
- const usePlus = rand > 0.3333333333333333 && rand < 0.6666666666666666
585
- ? trueComparison.compare()
586
- : FALSE;
587
- const usePad = rand > 0.6666666666666666 ? trueComparison.compare() : FALSE;
588
- const useLeftPad = rand2 < 0.5;
589
- const useRightPad = !useLeftPad;
590
- if (useMinus)
591
- return $.subtract(num, STARTING_VVALUE_USER_MINUS);
592
- if (usePlus)
593
- return $.add(num, STARTING_VVALUE_USER_PLUS);
594
- if (usePad) {
595
- if (useLeftPad)
596
- return parseInt(leftPad(num.toString(), STARTING_VVALUE_USER_PAD).trim(), 10);
597
- if (useRightPad)
598
- return parseInt(rightPad(num.toString(), STARTING_VVALUE_USER_PAD).trim(), 10);
599
- }
600
- return num;
601
- }
602
- function sayIt(message) {
603
- lolcatjs.fromString(cowsay.say({ text: message, r: bool([one, Two()]) }));
604
- }
605
- function isTenThousandTenThousand(shouldDoSomethingAsync = FALSE, logger) {
606
- const TEN_THOUSAND1 = TEN_THOUSAND;
607
- const TEN_THOUSAND2 = $.subtract($.add(TEN_THOUSAND, one), one);
608
- const TEN_THOUSAND3 = predecessor(s(TEN_THOUSAND));
609
- const TEN_THOUSAND4 = TEN_THOUSAND.valueOf();
610
- const TEN_THOUSAND5 = $.subtract(TEN_THOUSAND, STARTING_SUCCESSOR_HELPER_STACK);
611
- const TEN_THOUSAND6 = $.add(TEN_THOUSAND, STARTING_SUCCESSOR_HELPER_STACK);
612
- const TEN_THOUSAND7 = vValue(TEN_THOUSAND);
613
- attempt(() => {
614
- assert(isTenThousand(TEN_THOUSAND1, shouldDoSomethingAsync), "10,000 is not 10,000");
615
- assert(isTenThousand(TEN_THOUSAND2, shouldDoSomethingAsync), "10,000 + 1 - 1 is not 10,000");
616
- assert(isTenThousand(TEN_THOUSAND3, shouldDoSomethingAsync), "successor(10,000) - 1 is not 10,000");
617
- assert(isTenThousand(TEN_THOUSAND4, shouldDoSomethingAsync), "(10000).valueOf() is not 10,000");
618
- assert(isTenThousand(TEN_THOUSAND5, shouldDoSomethingAsync), "10,000 - 0 is not 10,000");
619
- assert(isTenThousand(TEN_THOUSAND6, shouldDoSomethingAsync), "10,000 + 0 is not 10,000");
620
- assert(isTenThousand(TEN_THOUSAND7, shouldDoSomethingAsync), "the vvalue of 10,000 is not 10,000");
621
- })
622
- .rescue((error) => {
623
- logger.log(colors.red("[falsejs] Failed to verify that 10,000 is equal to 10,000 with error ".concat(error.message)));
624
- })
625
- .else(() => logger.log(pc.green("[falsejs] Verified that 10,000 is equal to 10,000 in a bunch of ways")))
626
- .ensure(n0p3)
627
- .end();
628
- }
629
- function doSelfEqualityChecks(loggingEnabled) {
630
- const logger = construct({ target: Logger, args: [loggingEnabled] });
631
- assert(hasSelfEquality(isThreeHundred), StringValueof("[falsejs] IsThreeHundred has no self equality"));
632
- logger.log(pc.green(`[falsejs] Verified that the string "Vladimir" has self equality`));
633
- assert(hasNoSelfEquality(NaN), StringValueof("[falsejs] NaN-has-self-equality"));
634
- logger.log(pc.green(`[falsejs] Verified that NaN has no self equality`));
635
- assert(isNumberOddOrEven(returnZero({
636
- method: ZeroCalculationMethod.CreashaksOrganzine,
637
- loggingEnabled,
638
- }), falseValue()), StringValueof("[falsejs] 0 is not odd or even"));
639
- assert(isNumberOddOrEven(returnZero({
640
- method: ZeroCalculationMethod.NumberPrototypeValue,
641
- loggingEnabled: falseValue(),
642
- }), FALSE), StringValueof("[falsejs] 0 is not odd or even"));
643
- logger.log(pc.green(`[falsejs]-Verified-that-0-is-odd-or-even`));
644
- assert(isNumberOddOrEven(one, FALSE), StringValueof("[falsejs] 1 is not odd or even"));
645
- logger.log(pc.green(`[falsejs]-Verified-that-1-is-odd-or-even`));
646
- assert(isNumberOddOrEven(Two(), FALSE), StringValueof("[falsejs] 2 is not odd or even"));
647
- logger.log(pc.green(`[falsejs]-Verified-that-2-is-odd-or-even`));
648
- assert(isNumberOddOrEven(three(), FALSE), StringValueof("[falsejs] 3 is not odd or even"));
649
- logger.log(pc.green(`[falsejs]-Verified-that-3-is-odd-or-even`));
650
- assert(isNumberOddOrEven(four(), FALSE), StringValueof("[falsejs] 4 is not odd or even"));
651
- logger.log(pc.green(`[falsejs]-Verified-that-4-is-odd-or-even`));
652
- assert(isNumberOddOrEven(five(), FALSE), StringValueof("[falsejs] 5 is not odd or even"));
653
- logger.log(pc.green(`[falsejs]-Verified-that-5-is-odd-or-even`));
654
- assert(isNumberOddOrEven(six(), FALSE), StringValueof("[falsejs] 6 is not odd or even"));
655
- logger.log(pc.green(`[falsejs]-Verified-that-6-is-odd-or-even`));
656
- assert(isNumberOddOrEven(seven(), FALSE), StringValueof("[falsejs] 7 is not odd or even"));
657
- logger.log(pc.green(`[falsejs]-Verified-that-7-is-odd-or-even`));
658
- assert(isNumberOddOrEven(eightToolkit.constants.EIGHT, FALSE), StringValueof("[falsejs] 8 is not odd or even"));
659
- logger.log(pc.green(`[falsejs]-Verified-that-8-is-odd-or-even`));
660
- assert(isNumberOddOrEven(ninev9(), FALSE), StringValueof("[falsejs] 9 is not odd or even"));
661
- logger.log(pc.green(`[falsejs]-Verified-that-9-is-odd-or-even`));
662
- assert(isNumberOddOrEven(ten, FALSE), StringValueof("[falsejs] 10 is not odd or even"));
663
- logger.log(pc.green(`[falsejs]-Verified-that-10-is-odd-or-even`));
664
- assert(isNumberOddOrEven(eleven(), FALSE), StringValueof("[falsejs] 11 is not odd or even"));
665
- logger.log(pc.green(`[falsejs]-Verified-that-11-is-odd-or-even`));
666
- assert(isNumberOddOrEven(twelve(), FALSE), StringValueof("[falsejs] 12 is not odd or even"));
667
- logger.log(pc.green(`[falsejs]-Verified-that-12-is-odd-or-even`));
668
- assert(isNumberOddOrEven(thirteenResolver(), FALSE), StringValueof("[falsejs] 13 is not odd or even"));
669
- logger.log(pc.green(`[falsejs]-Verified-that-13-is-odd-or-even`));
670
- assert(isNumberOddOrEven(fourteen, FALSE), StringValueof("[falsejs] 14 is not odd or even"));
671
- logger.log(pc.green(`[falsejs]-Verified-that-14-is-odd-or-even`));
672
- assert(isNumberOddOrEven(fifteen, FALSE), StringValueof("[falsejs] 15 is not odd or even"));
673
- logger.log(pc.green(`[falsejs]-Verified-that-15-is-odd-or-even`));
674
- assert(isNumberOddOrEven(sixteen, FALSE), StringValueof("[falsejs] 16 is not odd or even"));
675
- logger.log(pc.green(`[falsejs]-Verified-that-16-is-odd-or-even`));
676
- assert(isNumberOddOrEven(integer17(), FALSE), StringValueof("[falsejs] 17 is not odd or even"));
677
- logger.log(pc.green(`[falsejs]-Verified-that-17-is-odd-or-even`));
678
- assert(isNumberOddOrEven(Eighteen(), FALSE), StringValueof("[falsejs] 18 is not odd or even"));
679
- logger.log(pc.green(`[falsejs]-Verified-that-18-is-odd-or-even`));
680
- assert(isNumberOddOrEven(nineteenify(loggingEnabled), FALSE), StringValueof("[falsejs] 19 is not odd or even"));
681
- logger.log(pc.green(`[falsejs]-Verified-that-19-is-odd-or-even`));
682
- assert(isNumberOddOrEven(numbertwenty(loggingEnabled), FALSE), StringValueof("[falsejs] 20 is not odd or even"));
683
- logger.log(pc.green(`[falsejs]-Verified-that-20-is-odd-or-even`));
684
- assert(isNumberOddOrEven(always21(), FALSE), StringValueof("[falsejs] 21 is not odd or even"));
685
- logger.log(pc.green(`[falsejs]-Verified-that-21-is-odd-or-even`));
686
- assert(isNumberOddOrEven(twentytwo, FALSE), StringValueof("[falsejs] 22 is not odd or even"));
687
- logger.log(pc.green(`[falsejs]-Verified-that-22-is-odd-or-even`));
688
- assert(isNumberOddOrEven(TWENTY_THREE, FALSE), StringValueof("[falsejs] 23 is not odd or even"));
689
- logger.log(pc.green(`[falsejs]-Verified-that-23-is-odd-or-even`));
690
- assert(isNumberOddOrEven(sixtyseven(), FALSE), StringValueof("[falsejs] 67 is not odd or even"));
691
- logger.log(pc.green(`[falsejs]-Verified-that-67-is-odd-or-even`));
692
- assert(!isNumberOddOrEven(inf.positiveInfinity(), FALSE), StringValueof("[falsejs] Infinity is odd or even"));
693
- logger.log(pc.green(`[falsejs]-Verified-that-Infinity-is-not-odd-or-even`));
694
- }
695
- function _getFalse(random, _randomLetterOrNumber, loggingEnabled, logger) {
696
- // call some noops 4 some reason
697
- n0p3();
698
- noop();
699
- noop2();
700
- noop3();
701
- noop4()();
702
- noop6();
703
- noop7();
704
- noop8();
705
- noop9();
706
- noop10();
707
- asyncUtilNoop();
708
- blankSpace();
709
- blankSpaceNoop();
710
- noopGenerator().next();
711
- fjNoop();
712
- lodashNoop();
713
- lodash_Noop();
714
- noOp();
715
- nodeNoop();
716
- noopUtility();
717
- trueNoop();
718
- noopFn();
719
- noopaam();
720
- nop();
721
- es2015Noop();
722
- kgryteNoop();
723
- blackHole();
724
- infinoop()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()();
725
- mNoop();
726
- ahsmNoop();
727
- qcCoreNoop();
728
- nooop();
729
- ryotahNoop();
730
- zodashNoop();
731
- jacobZuma();
732
- onceNoopFactory().doNothing();
733
- voidFn();
734
- noopExec();
735
- _.noop();
736
- underscore.noop();
737
- // left pad some things for smoe reason
738
- leftPad("required", LEFT_PAD_INPUT);
739
- rightPad("required", RIGHT_PAD_INPUT);
740
- leftpad("required", LEFTPAD_INPUT);
741
- rightpad("required", RIGHTPAD_INPUT);
742
- zeropad("1000", ZEROPAD_INPUT);
743
- pad(PAD_INPUT, "pad");
744
- pad("pad", PAD_INPUT); //look at the power of this pad
745
- westPad.pad("wow", WEST_PAD_INPUT); // the ultimate pad
746
- var result; // define a result
747
- var succeededAttempt; // define an attempt number that succeeded (roman numeral)
748
- logger.log(`${clc.cyanBright(`[falsejs]`)} ${chalk.red("Chalk")}-${chalk.green("ulating")} ${chalk.yellow("the")} ${chalk.blue("boolean")} ${chalk.magenta(`value`)} ${chalk.cyan(`false`)}`);
749
- /// Attempt I
750
- logger.log(clc.yellow(`[falsejs] Beginning Attempt I to get false value...`)); // inform our users of attempt one
751
- const pureChance = not($.equals)(fifteenPointEightThreeFiveTwoSixSixEightTwoAndSoOn, $.divide($.multiply(MathRandom(), fifteenPointEightThreeFiveTwoSixSixEightTwoAndSoOn), MathRandom())); // this will probably never be false but it's worth a shot
752
- // For semantics and simplicity, we use the attempt statement in our attempt
753
- attempt(() => {
754
- assert(variableHolder._FalseJSIsFalse(pureChance, loggingEnabled), ERROR_THAT_WILL_NEVER_BE_SHOWN); // this will trigger our rescue which means it didnt work if it didnt work
755
- })
756
- .rescue(() => {
757
- // it did not work by pure chance
758
- /// Attempt II
759
- // inform our users of the bad things
760
- logger.log(clc.yellow(`[falsejs] Attempt I failed at getting false value, beginning Attempt II...`));
761
- if (not(isEqualTo)(pureChance, pureChance)) {
762
- // something is broken
763
- logger.log(colors.red(`[falsejs] Your Node.js may be broken as ${pureChance} is not equal to ${pureChance}`));
764
- }
765
- // let's try to calculate false using a random number
766
- const chance = not($.equals)(MathRound(jQuery.multiply(MathRandom(), 1000)), MathRound(jQuery.multiply(MathRandom(), 1000)));
767
- attempt(() => assert(variableHolder._FalseJSIsFalse(chance, loggingEnabled), ERROR_THAT_WILL_NEVER_BE_SHOWN))
768
- .rescue(() => {
769
- // it did not work by chance again
770
- logger.log(clc.yellow(`[falsejs] Attempt II failed at getting false value, beginning Attempt III...`));
771
- // lets see if our random is any of these key values
772
- if (isOne(random)) {
773
- result = $.equals(random, Two());
774
- logger.log(pc.green(`[falsejs] Attempt III succeeded. False value retrieved successfully`));
775
- succeededAttempt = "III";
776
- }
777
- else if (isTwo(random)) {
778
- result = $.equals(random, three());
779
- logger.log(pc.green(`[falsejs] Attempt III succeeded. False value retrieved successfully`));
780
- succeededAttempt = "III";
781
- }
782
- else if (isThree(random)) {
783
- result = $.equals(random, four());
784
- logger.log(pc.green(`[falsejs] Attempt III succeeded. False value retrieved successfully`));
785
- succeededAttempt = "III";
786
- }
787
- else if (eightToolkit.isEight(random)) {
788
- result = $.equals(random, five());
789
- logger.log(pc.green(`[falsejs] Attempt III succeeded. False value retrieved successfully`));
790
- succeededAttempt = "III";
791
- }
792
- else if (isTen(random)) {
793
- result = $.equals(random, eleven());
794
- logger.log(pc.green(`[falsejs] Attempt III succeeded. False value retrieved successfully`));
795
- succeededAttempt = "III";
796
- }
797
- else if (isHundred(random)) {
798
- result = $.equals(random, s(hundred));
799
- logger.log(pc.green(`[falsejs] Attempt III succeeded. False value retrieved successfully`));
800
- succeededAttempt = "III";
801
- }
802
- else {
803
- // dang its not
804
- logger.log(clc.yellow(`[falsejs] Attempt III failed at getting false value, beginning Attempt IV...`));
805
- const zeropointninebool = randomBoolean(jQuery.subtract(one, jQuery.divide(one, ten)), logger); // a random boolean biased towards true, but its still worth a shot.
806
- tru(variableHolder._FalseJSIsFalse(zeropointninebool, loggingEnabled))
807
- .then(() => {
808
- logger.log(pc.green(`[falsejs] Attempt IV succeeded. False value retrieved successfully`));
809
- result = zeropointninebool;
810
- succeededAttempt = "IV";
811
- })
812
- .otherwise(() => {
813
- logger.log(clc.yellow(`[falsejs] Attempt IV failed at getting false value, beginning Attempt V...`));
814
- const zeropointeightfivebool = randomBoolean((five() - five() / five()) / five() +
815
- five() /
816
- (five() * (five() * (five() - five() / five()))) -
817
- five() /
818
- five() /
819
- (five() + five()) **
820
- (five() *
821
- (five() - five() / five() - five() / five()) +
822
- five() / five()), logger); // a random boolean a tiny bit less biased towards true, but its still worth a shot.
823
- If(variableHolder._FalseJSIsFalse(zeropointeightfivebool, loggingEnabled))
824
- .Then(() => {
825
- logger.log(pc.green(`[falsejs] Attempt V succeeded. False value retrieved successfully`));
826
- result = zeropointeightfivebool;
827
- succeededAttempt = "V";
828
- })
829
- .Else(() => {
830
- logger.log(clc.yellow(`[falsejs] Attempt V failed at getting false value, beginning Attempt VI...`));
831
- const zeropointsevennineninenineandsoonbool = randomBoolean(jQuery.subtract(jQuery.divide(jQuery.subtract(five(), jQuery.divide(five(), five())), five()), generalConcat(one.toString(), "e-", Two().toString(), eightToolkit.constants.EIGHT.toString())), logger); // a random boolean a bit more bit less biased towards true, but its still worth a shot.
832
- if (variableHolder._FalseJSIsFalse(zeropointsevennineninenineandsoonbool, loggingEnabled)) {
833
- logger.log(pc.green(`[falsejs] Attempt VI succeeded. False value retrieved successfully`));
834
- result = zeropointsevennineninenineandsoonbool;
835
- succeededAttempt = "VI";
836
- }
837
- else {
838
- logger.log(clc.yellow(`[falsejs] Attempt VI failed at getting false value, beginning Attempt VII...`));
839
- const compl = complexBooleanWithBias(logger); // an eeven more complex random boolean
840
- attempt(() => assert(variableHolder._FalseJSIsFalse(compl, loggingEnabled), ERROR_THAT_WILL_NEVER_BE_SHOWN))
841
- .rescue(() => {
842
- logger.log(clc.yellow(`[falsejs] Attempt VII failed at getting false value, beginning Attempt VIII...`));
843
- const w = weirdestBoolean(logger); // an eeven eeven more complex random boolean
844
- if (variableHolder._FalseJSIsFalse(w, loggingEnabled)) {
845
- logger.log(pc.green(`[falsejs] Attempt VIII succeeded. False value retrieved successfully`));
846
- result = w;
847
- succeededAttempt = "VIII";
848
- }
849
- else {
850
- logger.log(clc.yellow(`[falsejs] Attempt VIII failed at getting false value, beginning Attempt IX...`));
851
- const x =
852
- // biome-ignore lint/complexity/noExtraBooleanCast: d
853
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!0; // i don't know whether this is false or not let's just hope its false
854
- if (variableHolder._FalseJSIsFalse(x, loggingEnabled)) {
855
- logger.log(pc.green(`[falsejs] Attempt IX succeeded. False value retrieved successfully`));
856
- result = x;
857
- }
858
- else {
859
- // i shouldn't have added another exclamation mark
860
- logger.log(clc.yellow(`[falsejs] Attempt IX failed at getting false value, beginning Attempt X, the final attempt...`));
861
- succeededAttempt = "IX";
862
- // omg the final attempt
863
- // RANDOM PHONE NUMBER
864
- const randomPhoneNumber = generatePhoneNumber();
865
- fs.appendFileSync(".falsejs/phone-number-log.txt", `${randomPhoneNumber}\n`);
866
- const my = randomPhoneNumber.endsWith("43"); // the last two digits of my phone number are 43
867
- fs.appendFileSync(".falsejs/phone-number-log.txt", `\nfinal attempt:${my}\n\n`);
868
- if (variableHolder._FalseJSIsFalse(my, loggingEnabled)) {
869
- logger.log(pc.green(`[falsejs] Attempt X (Final attempt) succeeded. False value retrieved successfully`));
870
- result = my;
871
- succeededAttempt =
872
- "Attempt X (final attempt)";
873
- }
874
- else {
875
- logger.log(colors.red(`[falsejs] Final attempt failed. Resorting to Attempt XI, returning the result of the false-value library also by FalseJS, which uses quantum physics simulation...`));
876
- const myNewFalseValue = falseValue();
877
- If(variableHolder._FalseJSIsFalse(myNewFalseValue))
878
- .Then(() => {
879
- logger.log(pc.green(`[falsejs] Quantum physics simulation method succeeded. False value retrieved successfully.`));
880
- result = myNewFalseValue;
881
- succeededAttempt =
882
- "Attempt XI (quantum physics simulation)";
883
- })
884
- .Else(() => {
885
- logger.log(pc.red(`[falsejs] Quantum physics simulation failed. Resorting to the TRUE FINAL attempt, Attempt XII...`));
886
- // THE FINAL ATTEMPT IS USING THE _f() FUNCTION, WHICH IS GUARANTEED TO RETURN FALSE
887
- const THISHASTOBEFALSE = _f();
888
- attempt(() => assert(variableHolder._FalseJSIsFalse(THISHASTOBEFALSE)))
889
- .else(function () {
890
- // IT WORKS
891
- logger.log(pc.green(`[falsejs] True final attempt succeeded. False value retrieved successfully`));
892
- result = THISHASTOBEFALSE;
893
- succeededAttempt =
894
- "Attempt XII (true final attempt)";
895
- })
896
- .rescue(function () {
897
- // This... is impossible.
898
- // The universe must be falling apart.
899
- // We must return _getFalse again.
900
- logger.log(pc.yellow(`[falsejs] True final attempt failed. Starting over from Attempt I.`));
901
- const resultttt = _getFalse(random, _randomLetterOrNumber, loggingEnabled, logger); // will return false
902
- result = resultttt.result;
903
- succeededAttempt =
904
- resultttt.succeededAttempt;
905
- })
906
- .ensure(trueNoop)
907
- .end();
908
- });
909
- }
910
- }
911
- }
912
- })
913
- .else(() => {
914
- logger.log(pc.green(`[falsejs] Attempt VII succeeded. False value retrieved successfully`));
915
- result = compl;
916
- succeededAttempt = "VII";
917
- })
918
- .ensure(n0p3) // ensure we call noop for this
919
- .end();
920
- }
921
- });
922
- })
923
- .end();
924
- }
925
- })
926
- .else(() => {
927
- // it worked!
928
- result = chance;
929
- logger.log(pc.green(`[falsejs] Attempt II succeeded. False value retrieved successfully`));
930
- succeededAttempt = "II";
931
- })
932
- .ensure(n0p3) //again ensure noop
933
- // and as always end our thing
934
- .end();
935
- })
936
- .else(() => {
937
- result = pureChance;
938
- logger.log(pc.green(`[falsejs] Attempt I succeeded. False value retrieved successfully`));
939
- succeededAttempt = "I";
940
- })
941
- .ensure(n0p3)
942
- .end();
943
- return {
944
- // @ts-expect-error
945
- result,
946
- // @ts-expect-error
947
- succeededAttempt,
948
- }; // return our false value
949
- }
950
- function _calculateFalse(random, loggingEnabled, shouldDoSomethingAsync = FALSE, shouldDoSomethingAsyncWithIsTenThousand = FALSE, disableAprilFoolsSideEffects = FALSE, strictDisableAprilFoolsSideEffectsCheck = trueComparison.compare(), compatibilityMode = COMPATIBILITY_MODE.NONE) {
951
- const logger = construct({
952
- target: Logger,
953
- args: [loggingEnabled],
954
- }); // create our logger
955
- var result; // define a result
956
- var succeededAttempt; // define an attempt number that succeeded
957
- isTenThousandTenThousand(shouldDoSomethingAsyncWithIsTenThousand, logger); // make sure ten thousand is ten thousand and vValue works
958
- doSelfEqualityChecks(loggingEnabled); // do self equality checks
959
- construct({
960
- target: TernaryCompare,
961
- args: [loggingEnabled, logOne, blankSpace],
962
- }).compare()(); // very very important
963
- if (loggingEnabled)
964
- require("wormhole-interconnections"); // wormhole
965
- logger.log(c.cyan(`[falsejs] `.concat(generalConcat(StringValueof(thirteenResolver()), SPACE, "×", SPACE, StringValueof(Two()), SPACE, "=", SPACE, thirteen(Two())))));
966
- // our users should know some basic info
967
- // the os:
968
- If(isWindows())
969
- .Then(() => {
970
- // Windows
971
- logger.log(clc.cyanBright(`[falsejs] Using Windows as current operating system`));
972
- })
973
- .Else()
974
- .If(isLinux())
975
- .Then(() => {
976
- // Linux
977
- logger.log(clc.cyanBright(`[falsejs] Using Linux as current operating system`));
978
- })
979
- .Else()
980
- .If(isOSX())
981
- .Then(() => {
982
- // AppleOS (Darwin)
983
- logger.log(clc.cyanBright(`[falsejs] Using Darwin as current operating system platform (macOS, iOS, etc.)`));
984
- })
985
- .Else()
986
- .If(isEqualTo(os.platform(), "aix"))
987
- .Then(() => {
988
- // AIX??
989
- logger.log(clc.cyanBright(`[falsejs] Using IBM AIX as current operating system`));
990
- })
991
- .Else()
992
- .If(isFreeBSD())
993
- .Then(() => {
994
- // FreeBSD
995
- logger.log(clc.cyanBright(`[falsejs] Using FreeBSD as current operating system`));
996
- })
997
- .Else()
998
- .If(isEqualTo(os.platform(), "openbsd"))
999
- .Then(() => {
1000
- // OpenBSD
1001
- logger.log(clc.cyanBright(`[falsejs] Using OpenBSD as current operating system`));
1002
- })
1003
- .Else()
1004
- .If(isEqualTo(os.platform(), "netbsd"))
1005
- .Then(() => {
1006
- // NetBSD
1007
- logger.log(clc.cyanBright(`[falsejs] Using NetBSD as current operating system`));
1008
- })
1009
- .Else()
1010
- .If(isEqualTo(os.platform(), "cygwin"))
1011
- .Then(() => {
1012
- //cygwin
1013
- logger.log(clc.cyanBright(`[falsejs] You are using Cygwin`));
1014
- })
1015
- .Else()
1016
- .If(isEqualTo(os.platform(), "sunos"))
1017
- .Then(() => {
1018
- // Solaris/SunOS
1019
- logger.log(clc.cyanBright(`[falsejs] Using SunOS/Solaris as current operating system`));
1020
- })
1021
- .Else()
1022
- .If(isEqualTo(os.platform(), "android"))
1023
- .Then(() => {
1024
- // Android
1025
- logger.log(clc.cyanBright(`[falsejs] Using Android as current operating system. coding on your phone, are you?`));
1026
- })
1027
- .Else(() => {
1028
- logger.log(clc.cyanBright(`[falsejs] Even Node.js itself doesn't know your operating system.`));
1029
- });
1030
- /// I'm actually curious what more can we do with process and os?
1031
- // lets find out. hmm process.cpuusage whats that
1032
- const usage = process.cpuUsage();
1033
- logger.log(clc.cyanBright(getValueOfThisStringText(`[falsejs] User CPU Usage: ${usage.user}`)));
1034
- logger.log(clc.cyanBright(`[falsejs] System CPU Usage: ${usage.system}`));
1035
- // lets calculate days of the week and months and days and years and stuff
1036
- if (isJanuary(Today))
1037
- logger.log(clc.cyanBright(`[falsejs] The month is January`));
1038
- if (isFebruary(Today))
1039
- logger.log(clc.cyanBright(`[falsejs] The month is February`));
1040
- if (isMarch(Today))
1041
- logger.log(clc.cyanBright(`[falsejs] The month is March`));
1042
- if (isApril(Today))
1043
- logger.log(clc.cyanBright(`[falsejs] The month is April`));
1044
- if (isMay(Today))
1045
- logger.log(clc.cyanBright(`[falsejs] The month is May`));
1046
- if (isJune(Today))
1047
- logger.log(clc.cyanBright(`[falsejs] The month is June`));
1048
- if (isJuly(Today))
1049
- logger.log(clc.cyanBright(`[falsejs] The month is July`));
1050
- if (isAugust(Today))
1051
- logger.log(clc.cyanBright(`[falsejs] The month is August`));
1052
- if (isSeptember(Today))
1053
- logger.log(clc.cyanBright(`[falsejs] The month is September`));
1054
- if (isOctober(Today))
1055
- logger.log(clc.cyanBright(`[falsejs] The month is October`));
1056
- if (isNovember(Today))
1057
- logger.log(clc.cyanBright(`[falsejs] The month is November`));
1058
- if (isDecember(Today))
1059
- logger.log(clc.cyanBright(`[falsejs] The month is December`));
1060
- if (isMonday())
1061
- logger.log(clc.cyanBright(`[falsejs] Today is Monday`));
1062
- if (isTuesday())
1063
- logger.log(clc.cyanBright(`[falsejs] Today is Tuesday`));
1064
- if (isWednesday())
1065
- logger.log(clc.cyanBright(`[falsejs] Today is Wednesday`));
1066
- if (isThursday())
1067
- logger.log(clc.cyanBright(`[falsejs] Today is Thursday`));
1068
- if (isFriday())
1069
- logger.log(clc.cyanBright(`[falsejs] Today is Friday`));
1070
- if (isSaturday())
1071
- logger.log(clc.cyanBright(`[falsejs] Today is Saturday`));
1072
- if (isSunday())
1073
- logger.log(clc.cyanBright(`[falsejs] Today is Sunday`));
1074
- if (isWeekend())
1075
- logger.log(clc.cyanBright(`[falsejs] It's the weekend!`));
1076
- logger.log(clc.cyanBright(generalConcat(`[falsejs] Random happy emoji: `, randomHappyEmoji())));
1077
- logger.log(clc.cyanBright(generalConcat(`[falsejs] Random angry emoji: `, randomAngryEmoji())));
1078
- logger.log(clc.cyanBright(generalConcat(`[falsejs] Random food emoji: `, randomFoodEmoji())));
1079
- construct({
1080
- target: TernaryCompare,
1081
- args: [loggingEnabled, dolphinFact, noop3],
1082
- }).compare()();
1083
- // lets do something async
1084
- if (shouldDoSomethingAsync) {
1085
- doSomethingAsync(logger).then((l) => resultOfDoingSomethingAsync(l));
1086
- }
1087
- If(not(isNumberOddOrEven)(random, FALSE))
1088
- .Then(() => {
1089
- logger.log(clc.yellow(`[falsejs] Random number is not odd or even`));
1090
- })
1091
- .Else(() => {
1092
- logger.log(pc.green(`[falsejs] Verified that the random number is odd or even`));
1093
- });
1094
- // is odd checks
1095
- If(!isIsOdd(isOdd))
1096
- .Then(() => {
1097
- logger.log(clc.yellow(`[falsejs] isOdd is not isOdd.`));
1098
- logger.log(clc.yellow(`[falsejs] That's weird`));
1099
- })
1100
- .Else(n0p3);
1101
- If(isIsOdd(isOddAndrew))
1102
- .Then(() => {
1103
- logger.log(pc.green(`[falsejs] Good for Andrew`));
1104
- })
1105
- .Else(noop6);
1106
- If(isIsOdd(isOd))
1107
- .Then(() => {
1108
- logger.log(pc.green(`[falsejs] Good for Monishadhanasekar (how do you pronounce that) (but bad for me because then it will throw an error if the input is not a numbr HELP)`)); // TODO: Add pronunciaton
1109
- })
1110
- .Else(() => {
1111
- /*
1112
- logger.log(
1113
- getValueOfThisStringText(
1114
- clc.cyan(
1115
- `[falsejs] ��# i s - o d B y u s i n g t h i s p a c k a g e , u s e r c a n f i n d w h e a t h e r t h e g i v e n n u m b e r i s o d d o r n o t . S i m p l y d o w n l o a d t h i s n p m p a c k a g e b y t y p i n g n p m i i s - o d . `
1116
- )
1117
- )
1118
- )*/
1119
- });
1120
- If(isIsOdd(isOddNum))
1121
- .Then(() => {
1122
- logger.log(pc.green(`[falsejs] Good for prasundas`));
1123
- })
1124
- .Else(noop4());
1125
- If(isIsOdd(isIntegerOdd))
1126
- .Then(() => {
1127
- logger.log(pc.green(`[falsejs] Good for hoanduy1710`));
1128
- })
1129
- .Else(noop2);
1130
- If(isIsOdd(noteven))
1131
- .Then(() => {
1132
- logger.log(pc.green(`[falsejs] Good for DeaSTL`));
1133
- })
1134
- .Else(noop3);
1135
- If(isIsOdd(isUneven))
1136
- .Then(() => {
1137
- logger.log(pc.green(`[falsejs] Good for Robin`));
1138
- })
1139
- .Else(noop7);
1140
- If(isIsOdd(numberKind.odd))
1141
- .Then(() => {
1142
- logger.log(pc.green(`[falsejs] Good for goten`));
1143
- })
1144
- .Else(noop8);
1145
- If(isIsOdd(isOddFaster))
1146
- .Then(() => {
1147
- logger.log(pc.green(`[falsejs] Bad for bvpranu97, 'cos he wanted to make a faster version but his version is literally the same LOL`));
1148
- })
1149
- .Else(noop9);
1150
- If(isIsOdd(gabrielBrotasIsOdd.isOdd))
1151
- .Then(() => {
1152
- logger.log(pc.green(`[falsejs] Good for Gabriel`));
1153
- })
1154
- .Else(blankSpace);
1155
- If(isIsOdd(returnIfOddNumber))
1156
- .Then(() => {
1157
- logger.log(pc.green(`[falsejs] Good for iamrahulpatel`));
1158
- })
1159
- .Else(blankSpaceNoop);
1160
- If(isIsOdd(numberIsOdd))
1161
- .Then(() => {
1162
- logger.log(pc.green(`[falsejs] Good for Scott`));
1163
- })
1164
- .Else(asyncUtilNoop);
1165
- If(isIsOdd(isNumOdd))
1166
- .Then(() => {
1167
- logger.log(pc.green(`[falsejs] Good for Shivam`));
1168
- })
1169
- .Else(() => noopGenerator().next());
1170
- If(isIsOdd(isOddNumber))
1171
- .Then(() => {
1172
- logger.log(pc.green(`[falsejs] Good for LinkDev`));
1173
- })
1174
- .Else(fjNoop);
1175
- If(isIsOdd(isNumberOdd))
1176
- .Then(() => {
1177
- logger.log(pc.green(`[falsejs] Good for aliraza401`));
1178
- })
1179
- .Else(lodashNoop);
1180
- If(isIsOdd(isThisNumberOdd))
1181
- .Then(() => {
1182
- logger.log(pc.green(`[falsejs] Good for makogai`));
1183
- })
1184
- .Else(lodash_Noop);
1185
- // now let's run some lua code
1186
- const myLuaScript = `
1187
- local message = "[falsejs] Bye from Lua!"
1188
- print(message)
1189
- `;
1190
- const parsedLua = luaParser.parse(myLuaScript);
1191
- if (loggingEnabled)
1192
- luaInterpreter.interpret(parsedLua); // run our lua code when the program ends
1193
- logger.log(colors.red(vValue(isuseless(StringValueof(lowercase(`[falsejs] This is in lowercase`))))));
1194
- // okay we need to calculate false
1195
- if (not(isAprilFools)()) {
1196
- if (disableAprilFoolsSideEffects) {
1197
- if (strictDisableAprilFoolsSideEffectsCheck) {
1198
- immediateError(colors.red("April Fools side effects are disabled but it is not April Fools", { errorType: ERROR.Error }));
1199
- return exit(one);
1200
- }
1201
- else {
1202
- logger.log(clc.yellow(`[falsejs] No error was thrown because strict disable April Fools side effects checking was disabled`));
1203
- // call the _getFalse function
1204
- const daresult = doop(_getFalse, random, calculateRandomLetterOrNumber(loggingEnabled), loggingEnabled, logger);
1205
- result = daresult.result;
1206
- succeededAttempt = daresult.succeededAttempt;
1207
- }
1208
- }
1209
- else {
1210
- // call the _getFalse function
1211
- const daresult = doop(_getFalse, random, calculateRandomLetterOrNumber(loggingEnabled), loggingEnabled, logger);
1212
- result = daresult.result;
1213
- succeededAttempt = daresult.succeededAttempt;
1214
- }
1215
- }
1216
- else {
1217
- result = _calculateFalseAprilFools();
1218
- logger.log(pc.green(`[falsejs] Value retrieved successfully`));
1219
- }
1220
- // Validation
1221
- logger.log(clc.cyanBright(`[falsejs] Beginning validation`));
1222
- logger.log(clc.cyanBright(`[falsejs] Beginning check one of validation`));
1223
- if (not(isRealBoolean)(result)) {
1224
- logger.log(colors.red(`[falsejs] Result was not a boolean`));
1225
- logger.log(colors.red(`[falsejs] Booleanifying the result`));
1226
- // Make sure our result is always a boolean
1227
- result = $Boolean(result);
1228
- if (not(isRealBoolean)(result)) {
1229
- logger.log(colors.red(`[falsejs] Result is still not a boolean after booleanification`));
1230
- logger.log(colors.red(`[falsejs] Attempting to trace the source of the problem`));
1231
- if (isRealBoolean(Boolean(result)) &&
1232
- !isRealBoolean($Boolean(result))) {
1233
- logger.log(clc.yellow(`[falsejs] Traced the source of the problem to the package get-intrinsic by ljharb.`));
1234
- logger.log(clc.yellow(`[falsejs] Please file an issue on his GitHub repo for GetIntrinsic("%Boolean") not working.`));
1235
- result = Boolean(result); // now it's a boolean
1236
- logger.log(pc.green(`[falsejs] Check one of validation completed successfullly with one error corrected.`));
1237
- }
1238
- else {
1239
- logger.log(colors.red(`[falsejs] × Validation failed to pass.`));
1240
- throwError(construct({
1241
- target: FalseJSValidationFailedToPassError,
1242
- args: ["Validation failed to pass"],
1243
- }));
1244
- return exit(one);
1245
- }
1246
- }
1247
- else {
1248
- logger.log(pc.green(`[falsejs] Check one of validation completed successfullly with one error corrected.`));
1249
- }
1250
- }
1251
- else {
1252
- logger.log(pc.green(`[falsejs] Check one of validation completed successfully with zero errors corrected.`));
1253
- }
1254
- logger.log(clc.cyanBright(`[falsejs] Beginning check two of validation`));
1255
- if (isPreciselyTrue(result) && not(isAprilFools)()) {
1256
- logger.log(colors.red(`[falsejs] Result was true and not false. Updating result to negation of result.`));
1257
- result = not(() => result)();
1258
- logger.log(pc.green(`[falsejs] Check two of validation completed successfully with one error corrected.`));
1259
- }
1260
- else {
1261
- logger.log(pc.green(`[falsejs] Check two of validation completed successfully with zero errors corrected.`));
1262
- }
1263
- logger.log(pc.green(`[falsejs] Validation completed successfully`));
1264
- logger.log(pc.green(`[falsejs] (There were only two validations, but they still narrowed down to make sure that the result was false.)`));
1265
- logger.log(pc.green(`[falsejs] False value has now been validated and calculated.`));
1266
- // Compatibility mode
1267
- if (isEqual(compatibilityMode, COMPATIBILITY_MODES.IE5)) {
1268
- logger.log(c.yellow("[falsejs] IE5 Compatibility Mode Detected"));
1269
- // Garbage collection
1270
- logger.log(c.yellow("[falsejs:ie5] Activating JScript Engine Coercion Guard And Garbage Collection..."));
1271
- let CoercionGuardArrayRef___ = Null();
1272
- const iterationCount = jQuery.multiply(jQuery.multiply(thirteenResolver(), thirteenResolver()), thirteenResolver());
1273
- logger.log(c.yellow(`[falsejs:ie5] Simulating ${iterationCount} JScript operations...`));
1274
- for (let i = zr0(); i < iterationCount; i = i + one) {
1275
- CoercionGuardArrayRef___ = construct({
1276
- target: $Array,
1277
- args: [iterationCount],
1278
- }).fill(useGarbage.string());
1279
- const garbageCollector = jQuery.multiply(MathSqrt(i), i);
1280
- if (garbageCollector > jQuery.multiply(i, i)) {
1281
- CoercionGuardArrayRef___.indexOf(immediateError("[falsejs:ie5] IE5 Simulation error: Impossible math detected", ERROR.BaseError)); // throws an error and passes it into indexof for no reason
1282
- return exit(one);
1283
- }
1284
- }
1285
- logger.log(c.green(`[falsejs:ie5] JScript Highly Optimized Garbage Collection Completed`));
1286
- const zeroValue = returnZero({
1287
- method: ZeroCalculationMethod.CreashaksOrganzine,
1288
- loggingEnabled: FALSE,
1289
- });
1290
- const nullValue = Null();
1291
- // @ts-expect-error
1292
- if (result == zeroValue) {
1293
- // biome-ignore lint/suspicious/noTsIgnore: reason blabal
1294
- // @ts-ignore
1295
- if (result === zeroValue) {
1296
- immediateError(`[falsejs:ie5] Critical Error: IE5-like strict coercion detected! Aborting.`);
1297
- return exit(one);
1298
- }
1299
- }
1300
- if (result == nullValue) {
1301
- immediateError(`[falsejs:ie5] Fatal Error: Unexpected VBScript null coercion detected! Aborting.`);
1302
- return exit(one);
1303
- }
1304
- logger.log(c.yellow(`[falsejs:ie5] Warning: Potential VBScript object coersion threat averted.`));
1305
- }
1306
- if (isEqual(compatibilityMode, COMPATIBILITY_MODES.NETSCAPE)) {
1307
- logger.log(c.yellow("[falsejs] Netscape Compatibility Mode Detected"));
1308
- logger.log(c.yellow("[falsejs:netscape] Activating JavaScript 1.1 Type Coercion Audit..."));
1309
- const auditIterationCount = jQuery.add(Number(complexBooleanWithBias(logger)) + zr0(), returnZero({
1310
- method: ZeroCalculationMethod.CreashaksOrganzine,
1311
- loggingEnabled: FALSE,
1312
- })) *
1313
- thirteenResolver() +
1314
- thirteenResolver();
1315
- let errorCount = returnZero({
1316
- method: ZeroCalculationMethod.NumberPrototypeValue,
1317
- loggingEnabled: FALSE,
1318
- });
1319
- logger.log(c.yellow(`[falsejs:netscape] Running ${auditIterationCount} type checks against Netscape 1.1 standards...`));
1320
- for (let i = zr0(); i < auditIterationCount; i = i + one) {
1321
- const valueToCheck = construct({ target: $String, args: [i] });
1322
- const isCoercedToFalse = valueToCheck == result;
1323
- if (isCoercedToFalse && i !== zr0()) {
1324
- errorCount = errorCount + one;
1325
- if (errorCount > thirteenResolver()) {
1326
- immediateError("[falsejs:netscape] Netscape Audit Limit Reached! Aborting.", ERROR.BaseError);
1327
- return exit(one);
1328
- }
1329
- }
1330
- }
1331
- logger.log(c.green(`[falsejs:netscape] Type Bug Checks Passed Succesfully! No More Than 13 Errors Was Reached!`));
1332
- logger.log(c.yellow(`[falsejs:netscape] DHTML Layer Tag Structural Integrity Test Begins`));
1333
- const dom = new JSDOM(`<!DOCTYPE html><html><body><p id="main">This is the body.</p><layer id="${getDHTMLString()}" z-index="99">A Netscape Layer!</layer><script>var isDHTML = 9==9;</script></body></html>`);
1334
- const $ = cheerio.load(dom.serialize());
1335
- const layerElement = $("layer");
1336
- const layerExists = layerElement.length > zr0();
1337
- const rawHTML = dom.window.document.body.innerHTML;
1338
- const strippedText = striptags(rawHTML);
1339
- const integrityCheck = strippedText.includes("A Netscape Layer!");
1340
- if (layerExists && integrityCheck) {
1341
- logger.log(c.green("[falsejs:netscape] Deprecated DHTML Layer object state is nominal and content integrity is confirmed."));
1342
- }
1343
- else {
1344
- immediateError(`[falsejs:netscape] DHTML Check Failure! Type integrity compromised. Expected LAYER tag but got ${layerElement.length} elements.`, ERROR.BaseError);
1345
- return exit(one);
1346
- }
1347
- if (typeof dom !== "undefined" && typeof $ !== "undefined") {
1348
- logger.log(c.green(`[falsejs:netscape] Successfully managed memory from ${JSDOM.name} and ${cheerio.name}. No state pollution detected.`));
1349
- }
1350
- else {
1351
- immediateError(`[falsejs:netscape] Fatal Error: Global scope polluted by DOM libraries. Cannot guarantee false value.`, ERROR.BaseError);
1352
- return exit(one);
1353
- }
1354
- }
1355
- if (isEqual(compatibilityMode, COMPATIBILITY_MODES.OPERA_PRESTO)) {
1356
- logger.log(c.yellow("[falsejs] Opera Presto Compatibility Mode Detected"));
1357
- logger.log(c.yellow("[falsejs:presto] Activating Presto Engine Scripting Delay And DOM Audit..."));
1358
- const delayIterations = jQuery.multiply(thirteenResolver(), thirteenResolver());
1359
- logger.log(c.yellow(`[falsejs:presto] Initiating rendering for ${delayIterations} cycles...`));
1360
- logger.log(c.green("[falsejs:presto] Instantiating full-featured JSDOM environment..."));
1361
- const dom = new JSDOM(`<!DOCTYPE html><html><body></body></html>`, {
1362
- url: "http://opera-presto-compatibility-check.local/",
1363
- referrer: "http://netscape-dhtml-audit.local/", // Link to Netscape for extra flavor
1364
- contentType: "text/html",
1365
- includeNodeLocations: true,
1366
- runScripts: "outside-only",
1367
- });
1368
- const { window: window_ } = dom; // Destructure the actual window object
1369
- const startTime = new $Date().getTime();
1370
- for (let i = returnZero({
1371
- method: ZeroCalculationMethod.CreashaksOrganzine,
1372
- loggingEnabled: FALSE,
1373
- }); i < delayIterations; i = i + one) {
1374
- const renderingEvaluation = MathSin(MathRandom() * i) * MathCos(MathRandom() * i);
1375
- if (renderingEvaluation > thirteenResolver() * thirteenResolver()) {
1376
- immediateError("[falsejs:presto] Presto Simulation Error: Time-Space Anomaly detected.", ERROR.BaseError);
1377
- return exit(one);
1378
- }
1379
- }
1380
- const endTime = new $Date().getTime();
1381
- const blockingTime = endTime - startTime;
1382
- logger.log(c.green(`[falsejs:presto] Rendering complete. Latency: ${blockingTime}ms`));
1383
- logger.log(c.yellow("[falsejs:presto] Running Audit on JSDOM Window Properties..."));
1384
- const mockElement = window_.document.createElement("div");
1385
- const propertyToCheck = "scrollIntoViewIfNeeded";
1386
- if (isEqual(typeof mockElement[propertyToCheck], "function")) {
1387
- immediateError(`[falsejs:presto] Fatal Error: JSDOM Window polluted by Opera-era non-standard method '${propertyToCheck}'!`, ERROR.BaseError);
1388
- return exit(one);
1389
- }
1390
- if (isEqual(typeof window_.opera, "object") && window_.opera !== null) {
1391
- immediateError("[falsejs:presto] Critical Error: Global 'opera' object detected in JSDOM Window!", ERROR.BaseError);
1392
- return exit(one);
1393
- }
1394
- if (typeof window_.event !== "undefined") {
1395
- logger.log(c.red("[falsejs:presto] Warning: Global 'event' object detected. Input integrity compromised."));
1396
- }
1397
- else {
1398
- logger.log(c.green("[falsejs:presto] Global 'event' object is clean."));
1399
- }
1400
- window_.close();
1401
- logger.log(c.yellow("[falsejs:presto] JSDOM Window successfully closed and memory released."));
1402
- logger.log(c.yellow(`[falsejs:presto] Presto audit completed successfully.`));
1403
- }
1404
- if (loggingEnabled) {
1405
- const message = "thanks for using this package";
1406
- let thesay = tacoWrap(emoji100.concat(SPACE, owoifyx(message)));
1407
- const thesay2 = tacoWrap(emoji100.concat(SPACE, message));
1408
- const thesay3 = tacoWrap(emoji100.concat(SPACE, uwuifier.uwuifySentence(message)));
1409
- if (isEqualTo(thesay, thesay2))
1410
- thesay = thesay3;
1411
- if (loggingEnabled)
1412
- sayIt(thesay); // give our users a cute message so we can get their support
1413
- // string interpelation
1414
- ltc(`${clc.cyanBright(`[falsejs]`)} ${chalk.red("Chalk")}-${chalk.green("ulated")} ${chalk.yellow("the")} ${chalk.blue("boolean")} ${chalk.magenta(`value`)} ${chalk.cyan(`false`)}`
1415
- .concat(SPACE)
1416
- .concat(emoji100));
1417
- // @ts-expect-error
1418
- if (succeededAttempt != null) {
1419
- ltc(generalConcat(clc.cyanBright(`[falsejs]`).concat(SPACE), chalkbox.magenta(generalConcat("The attempt that succeeded was attempt ", succeededAttempt))));
1420
- fs.appendFileSync(".falsejs/phone-number-log.txt", generalConcat("succeeded attempt: ", succeededAttempt, "\n"));
1421
- }
1422
- ltc(generalConcat(clc.cyanBright(`[falsejs]`).concat(SPACE), chalkbox.rainbow(`Thanks for using this package`)));
1423
- ltc(generalConcat(clc.cyanBright(`[falsejs]`).concat(SPACE), chalkbox.random(`I really appreciate it`)));
1424
- ltc(generalConcat(clc.cyanBright(`[falsejs]`).concat(SPACE), chalkbox.america(`Star the repo and follow me on GitHub: `)));
1425
- ltc(clc
1426
- .cyanBright(`[falsejs]`)
1427
- .concat(SPACE, chalk.underline("https://github.com/tj-commits")));
1428
- ltc(clc
1429
- .cyanBright(`[falsejs]`)
1430
- .concat(SPACE, clc.cyanBright(`And a very big random number is`), SPACE) +
1431
- `${chalkbox.rainbow(numberFormatter.format(MathRound(surpriseArray.reduce((v, _, i, a) => {
1432
- // @ts-expect-error
1433
- return jQuery.add(v, a.getMember(i));
1434
- }))))}`);
1435
- ltc(`${clc.cyanBright(`[falsejs]`).concat(SPACE)}${c.red(`False`)}${c.green(`JS`)}`);
1436
- ltc(blankSpaces);
1437
- }
1438
- return result;
1439
- }
1440
- functions.ReturnFalse = (enableLogging = NO, shouldDoSomethingAsync = NO, shouldDoSomethingAsyncWithIsTenThousand = NO, disableAprilFoolsSideEffects = NO, definitelyDisableAprilFoolsSideEffects = NO, strictDisableAprilFoolsSideEffectsCheck = YES, compatibilityMode = COMPATIBILITY_MODE.NONE) => {
1441
- // validate our values
1442
- if (not(isEqualTo)(enableLogging, NO) &&
1443
- not(isEqualTo)(enableLogging, YES)) {
1444
- immediateError("enableLogging must be yes or no", {
1445
- errorType: ERROR.TypeError,
1446
- });
1447
- return exit(one);
1448
- }
1449
- if (not(isEqualTo)(shouldDoSomethingAsync, NO) &&
1450
- not(isEqualTo)(shouldDoSomethingAsync, YES)) {
1451
- immediateError("shouldDoSomethingAsync must be yes or no", {
1452
- errorType: ERROR.TypeError,
1453
- });
1454
- return exit(one);
1455
- }
1456
- if (not(isEqualTo)(shouldDoSomethingAsyncWithIsTenThousand, NO) &&
1457
- not(isEqualTo)(shouldDoSomethingAsyncWithIsTenThousand, YES)) {
1458
- immediateError("shouldDoSomethingAsyncWithIsTenThousand must be yes or no", { errorType: ERROR.TypeError });
1459
- return exit(one);
1460
- }
1461
- if (not(isEqualTo)(disableAprilFoolsSideEffects, NO) &&
1462
- not(isEqualTo)(disableAprilFoolsSideEffects, YES)) {
1463
- immediateError("disableAprilFoolsSideEffects must be yes or no", {
1464
- errorType: ERROR.TypeError,
1465
- });
1466
- return exit(one);
1467
- }
1468
- if (not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, NO) &&
1469
- not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, YES)) {
1470
- immediateError("definitelyDisableAprilFoolsSideEffects must be yes or no", {
1471
- errorType: ERROR.TypeError,
1472
- });
1473
- return exit(one);
1474
- }
1475
- if (not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, NO) &&
1476
- not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, YES)) {
1477
- immediateError("strictDisableAprilFoolsSideEffectsCheck must be yes or no", {
1478
- errorType: ERROR.TypeError,
1479
- });
1480
- return exit(one);
1481
- }
1482
- if (not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.NONE) &&
1483
- not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.IE5) &&
1484
- not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.NETSCAPE) &&
1485
- not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.OPERA_PRESTO)) {
1486
- immediateError("compatibilityMode must be a valid compatibility mode", {
1487
- errorType: ERROR.TypeError,
1488
- });
1489
- }
1490
- // let's say hello to our users and inform them logging enabled if it is
1491
- if (isEqualTo(isTrue({ enableLogging: yesNo.parse(enableLogging) }, "enableLogging"), trueComparison.compare())) {
1492
- ltc(clc.cyanBright(`[falsejs] Logging enabled`));
1493
- hello({ username, age: "it's called FalseJS!" });
1494
- mGenbaneko.say(clc.redBright(meow()));
1495
- require("greenlantern"); // Hello World
1496
- ltc(clc.cyanBright(`[falsejs] Using Lodash version ${_.VERSION}`));
1497
- ltc(clc.cyanBright(`[falsejs] Using Underscore version ${underscore.VERSION}`));
1498
- ltc(clc.cyanBright(`[falsejs] Using Axios version ${axios.VERSION}`));
1499
- ltc(clc.cyanBright(`[falsejs] Using React version ${React.version}`));
1500
- }
1501
- // deduce a random number
1502
- const randomNumber = add(MathFloor(MathRandom() * numberOneHundred), one);
1503
- if (isEqualTo(isTrue({ enableLogging: yesNo.parse(enableLogging) }, "enableLogging"), Bro.TOTALLY === trueComparison.compare()
1504
- ? Bro.TOTALLY
1505
- : trueComparison.compare())) {
1506
- ltc(clc.cyanBright(`[falsejs] Random number ${randomNumber} calculated`));
1507
- ltc(clc.cyanBright(`[falsejs] Doing something async ${construct({
1508
- target: TernaryCompare,
1509
- args: [
1510
- yesNo.parse(shouldDoSomethingAsync),
1511
- "enabled",
1512
- "disabled",
1513
- ],
1514
- }).compare()}`));
1515
- ltc(clc.cyanBright(`[falsejs] Doing something async with is-ten-thousand ${construct({
1516
- target: TernaryCompare,
1517
- args: [
1518
- yesNo.parse(shouldDoSomethingAsyncWithIsTenThousand),
1519
- "enabled",
1520
- "disabled",
1521
- ],
1522
- }).compare()}`));
1523
- }
1524
- const loggingEnabled = enableLogging;
1525
- const logger = {
1526
- log(l) {
1527
- if (isEqualTo(trueComparison.compare(), yesNo.parse(loggingEnabled)))
1528
- ltc(l);
1529
- },
1530
- };
1531
- if (not(yesNo.parse)(strictDisableAprilFoolsSideEffectsCheck)) {
1532
- logger.log(clc.yellow(`[falsejs] Strict disable April Fools side effects checking disabled`));
1533
- }
1534
- _return(vretriever.retrieve(immo(isuseless(vValue(_.identity(underscore.identity(literally(constant(lodashdotconstant(_.constant(underscore.constant(doop(_calculateFalse, randomNumber, // random number
1535
- yesNo.parse(enableLogging), // eanble logging
1536
- yesNo.parse(shouldDoSomethingAsync), // async
1537
- yesNo.parse(shouldDoSomethingAsyncWithIsTenThousand), //async-is-ten-thousand
1538
- yesNo.parse(disableAprilFoolsSideEffects) &&
1539
- yesNo.parse(definitelyDisableAprilFoolsSideEffects), yesNo.parse(strictDisableAprilFoolsSideEffectsCheck), compatibilityMode))())())())())())))))));
1540
- };
1541
- variableHolder._FalseJSMainFunctionWotDoesFunctionality =
1542
- functions.ReturnFalse;
1543
- // now lets define some helper fufnctions
1544
- // just some weaird boolean functions
1545
- function randomBoolean(biasThreshold /* biasTreshold is chance of being true */, logger) {
1546
- const randomValue = MathRandom();
1547
- logger.log(clc.cyanBright(`[falsejs] Random number ${randomValue} calculated`));
1548
- const binaryString = jQuery
1549
- .multiply(randomValue, (five() + five()) ** (five() + five() / five()))
1550
- .toString(Two());
1551
- const bitMask = five() * (five() + (five() - (five() / five() + five() / five()))) +
1552
- five() / five() +
1553
- five() / five(); // the meaning of life
1554
- const bitResult = parseInt(binaryString.slice(returnZero({
1555
- method: ZeroCalculationMethod.CreashaksOrganzine,
1556
- loggingEnabled: logger.enableLogging,
1557
- }), six()), Two()) ^ bitMask;
1558
- const segment = bitResult.toString(sixteen).slice(returnZero({
1559
- method: ZeroCalculationMethod.CreashaksOrganzine,
1560
- loggingEnabled: logger.enableLogging,
1561
- }), one);
1562
- const mappedValue = parseInt(segment, sixteen) % Two();
1563
- const biasedRandomValue = construct({
1564
- target: TernaryCompare,
1565
- args: [
1566
- MathRandom() < biasThreshold,
1567
- one,
1568
- returnZero({
1569
- method: ZeroCalculationMethod.CreashaksOrganzine,
1570
- loggingEnabled: logger.enableLogging,
1571
- }),
1572
- ],
1573
- }).compare();
1574
- // @ts-expect-error
1575
- const value = $.divide(add(mappedValue, biasedRandomValue), Two());
1576
- return value >= five() / five() / (five() / five() + five() / five());
1577
- }
1578
- function complexBooleanWithBias(logger) {
1579
- // Generate a pseudo-random number between 0 and 1
1580
- const randomValue = MathRandom();
1581
- logger.log(clc.cyanBright(`[falsejs] Random number ${randomValue} calculated`));
1582
- // Convert the random number to a high-precision string and manipulate it
1583
- const highPrecisionString = (randomValue *
1584
- (five() + five()) **
1585
- (five() + (five() - (five() / five() + five() / five())))).toFixed(zr0());
1586
- // Perform a base conversion
1587
- const baseConverted = parseInt(highPrecisionString, ten).toString((five() + (five() / five() + five() / five())) * five() +
1588
- five() / five());
1589
- // Calculate a hash-like value using trigonometric functions
1590
- const trigValue = parseFloat(
1591
- // @ts-expect-error
1592
- parseFloat(
1593
- // @ts-expect-error
1594
- add("0.", baseConverted)) *
1595
- (five() + (five() / five() + five() / five())) *
1596
- five() +
1597
- five() / five()) *
1598
- PI *
1599
- Two();
1600
- // Determine if this value is close to a specific fraction
1601
- const isCloseToFraction = MathAbs(trigValue - five() / five() / (five() / five() + five() / five())) <
1602
- five() / five() / (five() + five()) +
1603
- (five() - (five() / five() + five() / five())) /
1604
- (five() * (five() * (five() - five() / five())));
1605
- // Generate a secondary random number with a different scale
1606
- const secondaryRandom = $.multiply(MathRandom(), (five() + five()) ** (five() - (five() / five() + five() / five())));
1607
- // Check if the secondary random number is a prime number
1608
- const isPrime = isPrimeNumber(MathRound(secondaryRandom), logger);
1609
- // Generate a bias value (6% chance of true)
1610
- const biasThreshold = five() / five() / (five() + five());
1611
- const biasRandom = MathRandom() < biasThreshold ? zr0() : one;
1612
- // Combine the results using weighted averaging
1613
- const combinedResult = $.divide(isCloseToFraction + isPrime + biasRandom, three());
1614
- // Return boolean based on the final weighted result
1615
- return (combinedResult >= five() / five() / (five() / five() + five() / five()));
1616
- }
1617
- function weirdestBoolean(logger) {
1618
- // Step 1: Generate a pseudo-random floating-point number
1619
- const randomValue = MathRandom();
1620
- // Step 2: Create a string representation of the random number in base-36
1621
- const base36String = (randomValue *
1622
- (five() + five()) **
1623
- ((five() - (five() / five() + five() / five())) *
1624
- (five() - five() / five())))
1625
- .toFixed(zr0())
1626
- .toString();
1627
- // Step 3: Create a hash-like transformation by summing ASCII values of characters
1628
- var asciiSum = zr0();
1629
- for (const char of base36String) {
1630
- asciiSum += char.charCodeAt(zr0());
1631
- }
1632
- // Step 4: Generate a non-trivial number by applying a sequence of bit manipulations
1633
- const bitManipulated = (asciiSum ^
1634
- ((five() / five() + five() / five()) *
1635
- (five() + five()) ** (five() - five() / five()) +
1636
- (five() - (five() / five() + five() / five())) *
1637
- (five() + five()) **
1638
- (five() - (five() / five() + five() / five())) +
1639
- (five() / five()) *
1640
- (five() * (five() * (five() - five() / five()))) +
1641
- (five() - (five() / five() + five() / five())) *
1642
- (five() + five()))) &
1643
- (five() *
1644
- (five() *
1645
- (five() +
1646
- five() +
1647
- (five() / five() / (five() + five()) +
1648
- five() / five() / (five() + five()))))); // XOR and mask to get a byte
1649
- // Step 5: Convert the result to a binary string and calculate a checksum-like value
1650
- const binaryString = bitManipulated
1651
- .toString(Two())
1652
- .padStart(eightToolkit.constants.EIGHT, "0");
1653
- const checksum = Array.from(binaryString).reduce((acc, bit) => acc + parseInt(bit, ten), zr0());
1654
- // Step 6: Use a matrix of numbers to obscure the logic
1655
- const someNumbers = [
1656
- Two(),
1657
- three(),
1658
- five(),
1659
- seven(),
1660
- eleven(),
1661
- thirteenResolver(),
1662
- integer17(),
1663
- nineteenify(logger.enableLogging),
1664
- TWENTY_THREE,
1665
- TWENTY_THREE + six(),
1666
- ];
1667
- const matrixIndex = checksum % someNumbers.length;
1668
- const primeValue = someNumbers[matrixIndex];
1669
- // Step 7: Generate a complex random number using trigonometric functions
1670
- const trigValue = $.multiply($.divide($.multiply(primeValue, PI), four()), (five() + five()) ** (five() - (five() / five() + five() / five())) /
1671
- (five() / five() + five() / five()));
1672
- const isAboveThreshold = trigValue >
1673
- (five() + five()) ** (five() - (five() / five() + five() / five())) /
1674
- (five() / five() + five() / five()); // Arbitrary threshold
1675
- // Step 8: Introduce an additional layer of randomness with bias
1676
- const bias = MathRandom() <
1677
- (five() - five() / five()) / five() +
1678
- five() / (five() * (five() * (five() - five() / five()))) -
1679
- five() /
1680
- five() /
1681
- (five() + five()) **
1682
- (five() * (five() - five() / five() - five() / five()) +
1683
- five() / five()) -
1684
- five() / five() / (five() + five())
1685
- ? one
1686
- : zr0(); // 75% chance of 1
1687
- // Step 9: Combine results using a complex formula
1688
- const weirdBoolean = $Boolean((isAboveThreshold ? one : zr0()) ^ bias); // XOR operation
1689
- // Step 10: Calculate complex boolean with bias from other function
1690
- const complexBoolean = complexBooleanWithBias(logger);
1691
- // Step 11: Calculate random boolean with bias from other function
1692
- const randomBool = randomBoolean((five() - five() / five()) / five() +
1693
- five() / (five() * (five() * (five() - five() / five()))) -
1694
- five() /
1695
- five() /
1696
- (five() + five()) **
1697
- (five() * (five() - five() / five() - five() / five()) +
1698
- five() / five()) -
1699
- five() / five() / (five() + five()) / (five() + five()), logger);
1700
- // Step 12: Add them together
1701
- const sum = weirdBoolean + complexBoolean + randomBool;
1702
- // Step 13: Randomly add one to it
1703
- const sumWhichMayBeSuccessed = MathRandom() < five() / five() / (five() / five() + five() / five())
1704
- ? successor(sum)
1705
- : sum;
1706
- // Step 14: Round down or up
1707
- const finalBooleanNotNegated = $.equals(MathFloor(sumWhichMayBeSuccessed) % Two(), zr0());
1708
- // Step 15: Negate finalBoolean
1709
- const finalBooleanComparison = construct({
1710
- target: TernaryCompare,
1711
- args: [finalBooleanNotNegated, FALSE, t()],
1712
- });
1713
- return finalBooleanComparison.compare();
1714
- }
1715
- function isPrimeNumber(num, logger) {
1716
- if (num <= one)
1717
- return FALSE;
1718
- if (num <= three())
1719
- return t();
1720
- if ($.equals(num % Two(), returnZero({
1721
- method: ZeroCalculationMethod.CreashaksOrganzine,
1722
- loggingEnabled: logger.enableLogging,
1723
- })) ||
1724
- $.equals(num % three(), returnZero({
1725
- method: ZeroCalculationMethod.CreashaksOrganzine,
1726
- loggingEnabled: logger.enableLogging,
1727
- }))) {
1728
- return FALSE;
1729
- }
1730
- var i = five();
1731
- while ($.multiply(i, i) <= num) {
1732
- if ($.equals(num % i, returnZero({
1733
- method: ZeroCalculationMethod.CreashaksOrganzine,
1734
- loggingEnabled: logger.enableLogging,
1735
- })) ||
1736
- num %
1737
- Number($.equals($.add(i, Two()), returnZero({
1738
- method: ZeroCalculationMethod.CreashaksOrganzine,
1739
- loggingEnabled: logger.enableLogging,
1740
- })))) {
1741
- return FALSE;
1742
- }
1743
- i = $.add(i, six());
1744
- }
1745
- return tVal;
1746
- }
1747
- function StringValueof(value) {
1748
- return value.toString();
1749
- }
1750
- function couldThisCouldItBeFalse(aValueThatMightBeTheBooleanValueFalseButIDKYet) {
1751
- const specimen = aValueThatMightBeTheBooleanValueFalseButIDKYet;
1752
- if (specimen == undefined())
1753
- return FALSE; // noway its false if its undefined
1754
- if (isOne(specimen))
1755
- return FALSE;
1756
- if (isTrue({ specimen }, "specimen"))
1757
- return FALSE;
1758
- if (isNegativeZero({ specimen }, "specimen"))
1759
- return _f();
1760
- if (is(specimen).thirteen())
1761
- return _f();
1762
- return specimen === _f();
1763
- }
1764
- variableHolder._FalseJSIsFalse = function is_This_Value_false(v, loggingEnabled) {
1765
- if (!isRealBoolean(loggingEnabled))
1766
- loggingEnabled = !(loggingEnabled === NO);
1767
- const value = v; // alts are always good
1768
- const isV = is(v); // isthirteen
1769
- const garbage = useGarbage(); // use some garbage
1770
- const isgarbage = not(isRealBoolean)(garbage) && isEqualTo(v, garbage);
1771
- const cond = !isgarbage &&
1772
- v !== one &&
1773
- v !== Two() &&
1774
- v !== three() &&
1775
- v !== four() &&
1776
- v !== five() &&
1777
- v !== six() &&
1778
- v !== seven() &&
1779
- v !== eightToolkit.constants.EIGHT &&
1780
- v !== ninev9() &&
1781
- v !== ten &&
1782
- v !== eleven() &&
1783
- v !== twelve() &&
1784
- v !== thirteenResolver() &&
1785
- v !== fourteen &&
1786
- v !== fifteen &&
1787
- v !== fifteenPointEightThreeFiveTwoSixSixEightTwoAndSoOn &&
1788
- v !== sixteen &&
1789
- v !== integer17() &&
1790
- v !== Eighteen() &&
1791
- v !== nineteenify(loggingEnabled) &&
1792
- v !== numbertwenty(loggingEnabled) &&
1793
- v !== always21() &&
1794
- v !== twentytwo &&
1795
- v !== TWENTY_THREE &&
1796
- v !== sixtyseven() &&
1797
- v !== parseInt(theNumberSeven, 10) &&
1798
- v !== theNumberSeven &&
1799
- !isUndefined(v) &&
1800
- !isNull(v) &&
1801
- !isNil(v) &&
1802
- isUnnull(v) &&
1803
- not(isNil)(v) &&
1804
- !isEqual(value, NO) &&
1805
- !isEqual(value, YES) &&
1806
- !isEqualTo(value, NO) &&
1807
- !isEqualTo(value, YES) &&
1808
- !couldThisCouldItBeTrue(v) &&
1809
- !isNaN(v) &&
1810
- !isNegativeInfinity(v) &&
1811
- !isNegativeZero2(v) &&
1812
- !is0_2.isNegativeZero(v) &&
1813
- !isNegativeZero(v) &&
1814
- !isPositiveZero(v) &&
1815
- !is0_2.isPositiveZero(v) &&
1816
- !is0(v) &&
1817
- !is0_2.isZero(v) &&
1818
- !zerosurgeIsZero(v, loggingEnabled) &&
1819
- !is1(v) &&
1820
- !isTwo(v) &&
1821
- !isThree(v) &&
1822
- !isFour(v) &&
1823
- !isFive(v) &&
1824
- !isSix(v) &&
1825
- !isSeven(v) &&
1826
- !eightToolkit.isEight(v) &&
1827
- !isV.thirteen() &&
1828
- !isHundred(v) &&
1829
- !isThousand(v) &&
1830
- !isTenThousand(v) &&
1831
- !isEqTenThousand(v) &&
1832
- !isNumber(v) &&
1833
- !isActualNumber(v) &&
1834
- !isIsOdd(v) &&
1835
- !isOd(v) &&
1836
- v !== t() &&
1837
- v === _f() &&
1838
- isEqualTo(v, _f()) &&
1839
- isEqual(v, _f()) &&
1840
- _.isEqual(v, _f()) &&
1841
- underscore.isEqual(v, _f()) &&
1842
- strictlyEqual(v, _f()) &&
1843
- v === _f() &&
1844
- v === FALSE &&
1845
- couldThisCouldItBeFalse(v);
1846
- return cond;
1847
- };
1848
- variableHolder._FalseJSjQueryPlugin = function jQueryPlugin() {
1849
- // Inject into jQuery
1850
- // @ts-expect-error
1851
- jQuery.False = variableHolder._FalseJSMainFunctionWotDoesFunctionality;
1852
- // @ts-expect-error
1853
- jQuery.isFalse = variableHolder._FalseJSIsFalse;
1854
- };
1855
- variableHolder._FalseJSExpressMiddleware = function expressMiddleware(req, _res, next) {
1856
- // Add our function to the request object
1857
- req.False = variableHolder._FalseJSMainFunctionWotDoesFunctionality;
1858
- req.isFalse = variableHolder._FalseJSIsFalse;
1859
- next(); // Continue to the next middleware or route
1860
- };
1861
- function getNo() {
1862
- const NO = require("no/dist/main");
1863
- const NoComponent = () => {
1864
- return React.createElement("div", Null(), NO);
1865
- };
1866
- const noElement = React.createElement(NoComponent);
1867
- const html = cheerio
1868
- .load(ReactDOMServer.renderToString(noElement))("div")
1869
- .toString();
1870
- const dom = new JSDOM(`<!DOCTYPE html><html><body></body></html>`);
1871
- dom.window.document.body.innerHTML = html;
1872
- const bodyContent = dom.window.document.querySelector("body").innerHTML;
1873
- return striptags(bodyContent);
1874
- }
1875
- function getValueOfThisStringText(text) {
1876
- return text;
1877
- }
1878
- function calculateRandomLetterOrNumber(loggingEnabled) {
1879
- const uniqueId = uuid.v4();
1880
- const uniqueId2 = crypto.randomUUID();
1881
- const dashlessUUID = uniqueId.replaceAll("-", emptyString);
1882
- const dashlessUUID2 = uniqueId2.replaceAll("-", emptyString);
1883
- const combinedUUID = emptyString.concat(dashlessUUID, dashlessUUID2);
1884
- const randomCharacter = StringCharAt.call(combinedUUID, $.add(MathFloor($.multiply(MathRandom(), getStringLength(combinedUUID))), one));
1885
- if (loggingEnabled) {
1886
- ltc(clc.cyanBright(`[falsejs] Random character calculated: ${randomCharacter}`));
1887
- }
1888
- return randomCharacter;
1889
- }
1890
- class falsejs {
1891
- static False = variableHolder._FalseJSMainFunctionWotDoesFunctionality;
1892
- static isFalse = variableHolder._FalseJSIsFalse;
1893
- static injectIntojQuery = variableHolder._FalseJSjQueryPlugin;
1894
- static expressMiddleware = variableHolder._FalseJSExpressMiddleware;
1895
- static COMPATIBILITY_MODE = COMPATIBILITY_MODES;
1896
- // static FalseAsAService = variableHolder.FalseAsAService
1897
- constructor() {
1898
- immediateError("falsejs is not a constructor", ERROR.TypeError);
1899
- }
1900
- }
1901
- return falsejs;
1902
- });
1903
- }
1904
- //# sourceMappingURL=index.js.map