-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
3021 lines (2860 loc) · 124 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* FalseJS
* The ultimate library for getting the value of false.
* I didn't choose the 10x life. The 10x life chose me.
* @author tj-commits
* @license 10xGPWTHPL
* @version whatever_the_version_in_the_package.json_is
*/ /*
███████████████████████████████████████████████████████████████████████████████████
FalseJS is a library that helps you get the value of false.
It uses the power of Node.js, Vanilla JavaScript, Vapor.js, jQuery, Obfuscator.io,
MDE's true and false NPM packages and many other awesome packages, libraries, and 10x things created
by great open-source 10x engineer-developers are used to achieve this amazing masterpiece of a library.
The library is designed to be very easy to use and understand.
It uses loads of dependencies for ensurability and reliability.
If you have any questions or need assistance, please don't hesitate to ask.
FalseJS is licensed under the 10xGPWTHPL License.
Enjoy!
███████████████████████████████████████████████████████████████████████████████████ */
let doesItWork
try {
doesItWork = require("is-require-working")
} catch (e) {
doesItWork = !e
}
if (!doesItWork) {
//o crap
throw new Error("require not working, exiting node")
} else {
const isComputerOn = require("is-computer-on")
const isComputerOff = require("is-computer-off")
if (!isComputerOn() || isComputerOff()) {
throw new Error(
"no point doing anything if computer is not on, exiting node"
)
} else {
const isComputerOnFire = require("is-computer-on-fire").isComputerOnFire
if (isComputerOnFire()) {
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
)
} else {
const isNodeRunning = require("node-script-running")
if (!isNodeRunning()) {
// there's no point doing anything if node is not running
} else {
require("vanilla-javascript") // * because we are making something awesome!
require("vapor-js-npm") // the most awesome and flexible javascript framework
require("none")() // this improves load times and performance
require("-") // very, very, important
require("whatev") // also very, very, important
require("get-member")() // no silent undefined values
require("array-get-member")() // no silent undefined values for arrays
require("make-jquery-global")() // i <3 jQuery
require("jquery-basic-arithmetic-plugin") // why not exploit jQuery for math
require("console.dog") // bark
require("user")() // idk why this has so many downloads
require("ecto1")() // the most advanced thing ever
;(function (factory) {
module.exports.default = factory(jQuery)
})(function ($) {
"use strict"
//* MODULE IMPORTS
const _ = require("lodash") // every project needs lodash
const React = require("react") // the best framework
const ReactDOMServer = require("react-dom/server") // part of react
const cheerio = require("cheerio") // cheerio!
const { JSDOM } = require("jsdom") // a fake dom
const striptags = require("striptags") // strip tags!
const chalk = require("chalk") // color is the best!*/
var clc = require("cli-color") // another color module
const colors = require("@colors/colors/safe") // colors
const chalkbox = require("chalkbox") // with a box
const c = require("ansi-colors") // nothing wrong with even more colors
const pc = require("picocolors") // maybe even more colors libraries
const underscore = require("underscore") // underscore.js. the predecessor of lodash.
const axios = require("axios") // so we can send requests
const { generatePhoneNumber } = require("phone-number-generator-js") // phone numbers
const emptyString = require("empty-string")
const n0p3 = require("n0p3") // a noop
const noop2 = require("noop2") // nothing wrong with another noop
const noop3 = require("noop3") // nothing wrong with yet another noop
const noop4 = require("noop4") // noop factory
const noop6 = require("noop6") // again, nothing wrong with more noops
const noop7 = require("noop7") // i think you see where i'm going
const noop8 = require("noop8") //another...
const noop9 = require("noop9") // the ninth
const { noop, doop } = require("yanoop") // yanoop.
const asyncUtilNoop = require("async.util.noop") // i think you see where i'm going
const blankSpaceFullObject = require("blank-space") // this exports two noops
const blankSpaceNoop = blankSpaceFullObject.noop // noop one
const blankSpace = blankSpaceFullObject._ // and noop two
const noopGenerator = require("co-noop") // a noop generator!
const fjNoop = require("fj-noop").FUNC // fj noop
const lodashNoop = require("lodash.noop") // lodash noop
const lodash_Noop = require("lodash._noop") // another lodash noop!
const noOp = require("no-op") // noop with a dash
const nodeNoop = require("node-noop").noop // a noop
const noopUtility = require("@stdlib/utils-noop") // the most practical
const trueNoop = require("true-noop") // one of few true noops.
const noopFn = require("noop-fn") // it ends with a fn
const noopaam = require("noopaam") // noopaaaaaaaaaaaaaaaaaaaaaaaaaammmmmmmmmmmmm
const nop = require("nop") // just nop. what a funny name
// nop. nop. bop bop. boop. nop. boop. nop. nop. bop. bop bop nop.
// back to the code
const es2015Noop = require("es2015-noop") // the future is here
const kgryteNoop = require("@kgryte/noop") // how do you pronounce this guy's name
const blackHole = require("a-black-hole") // OH NO WE ARE GOING IN TO THE BLACK HOLE
const infinoop = require("infinoop") // noop. for ever. for. ev. er. FOR. EV. ER
const mNoop = require("m.noop").noop // the only other true noop i could find besides true-noop itself
const ahsmNoop = require("@ahsm/noop") // ahsm noop
const { noop: qcCoreNoop, nullFn: Null } = require("qc-core") // the qc core
const nooop = require("nooop") // someone put too many o's
const ryotahNoop = require("@ryotah/noop") // ryotah made a noop
const zodashNoop = require("@zodash/noop").noop // zodash made a noop
const jacobZuma = require("jacob-zuma") // south african flavored noop
const onceNoopFactory = require("once-noop/factory") // make a noop which can only be called once
const noopTS = require("noop-ts").default // noop ts
const voidFn = require("voidfn") // void fn
const noopExec = require("noop-exec") // exec
const attempt = require("attempt-statement") // has more features than trycatch statement
const assert = require("assert-fn") // more simple and elegant than built in node:assert
const hasSelfEquality = require("has-self-equality") // most things have self equality but lets make sure
const hasNoSelfEquality = require("has-no-self-equality") // again self equality
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"
const isOne = require("is-one") // the base is- function
const isTen = require("is-ten") // 10x the is-one
const isHundred = require("is-hundred") // 10x the is-ten
const isThousand = require("is-thousand").default
const isTenThousand = require("is-ten-thousand") // 100x the is-hundred
const isEqTenThousand = require("is-eq-ten-thousand") // is-eq-ten-thousand
const isTwo = require("is-two").isTwo // the successor of one
const isThree = require("is-three") // the successor of two
const isNegativeZero = require("is-negative-zero") // isNegativeZero
const isNegativeZero2 = require("negative-zero") // can't hurt to have another negative zero checker
const isPositiveZero = require("positive-zero") // positive zero
const isTrue = require("is-true") // true
const isPreciselyTrue = require("is-precisely-true") // real true
const is = require("is-thirteen") // comparison-against-twelve-free environment
const isThreeHundred = require("is-three-hundred") // is-three-hundred
const isNumber = require("is-number") // jonschlinkert
const isActualNumber = require("is-actual-number") // my is-number
const isIsOdd = require("is-is-odd") // isIsOdd
const isOdd = require("is-odd") //isOdd
const isOd = require("is-od") // isOd
const isOddAndrew = require("is-odd-andrew") // isOddAndrew
const isOddNum = require("is-odd-num") // another odd checker
const isIntegerOdd = require("is-integer-odd") // another!!!!
const noteven = require("not-even") // not even
const isUneven = require("is-uneven") // whysomany
const numberKind = require("number-kind") // this exports two fns!
const isOddFaster = require("is-odd-faster").isOdd
const gabrielBrotasIsOdd = require("gabriel-brotas-is-odd")
const returnIfOddNumber = require("return-if-odd-number")
const numberIsOdd = require("number-is-odd")
const isNumOdd = require("is-num-odd")
const isOddNumber = require("is-odd-number")
const isNumberOdd = require("is_number_odd")
const isThisNumberOdd = require("is-this-number-odd")
const isRealBoolean = require("is-real-boolean")
const add = require("examplebyraji") // a package
const cowsay = require("cowsay") // let's say stuff
const lolcatjs = require("lolcatjs") // the rainbow i tastes it
const parseBool = require("parse-bool") // parse a boolean
const owoifyx = require("owoifyx").default // UwU
const Uwuifier = require("uwuifier").default // UwU (x2)
const amogus = require("amogusify")
const luaParser = require("luaparse")
const luaInterpreter = require("lua-interpreter")
const exit = require("exit")
const appendType = require("append-type")
const concatenater = require("concatenater")
const generalConcat = require("general-concat")
const lowercase = require("convert-to-lower-case")
const construct = require("construct-new") // better than the new keyword
const { penis, vagina: variableHolder, mouth } = require("issue13") // some stuff
const $Promise = require("bluebird")
const GetIntrinsic = require("get-intrinsic")
// * INTRINSICS
const $Array = GetIntrinsic("%Array%")
const $BaseError = require("es-errors")
const $Boolean = GetIntrinsic("%Boolean%")
const $Date = GetIntrinsic("%Date%")
const $Function = GetIntrinsic("%Function%")
const MathRandom = GetIntrinsic("%Math.random%")
const MathFloor = GetIntrinsic("%Math.floor%")
const MathRound = GetIntrinsic("%Math.round%")
const PI = GetIntrinsic("%Math.PI%")
const MathAbs = GetIntrinsic("%Math.abs%")
const StringCharAt = GetIntrinsic("%String.prototype.charAt%")
// * another import
const _calculateFalseAprilFools = require("./aprilFoolsCalculateFalse") // april fools
// * HELPER FUNCTIONS FROM OTHER LIBRARIES THAT ARE BY FALSEJS
const couldThisCouldItBeTrue = require("@falsejs/is-true-helper")
const {
returnFalse,
isFalse: isPreciselyEqualToFalse
} = require("@falsejs/core-ish")
// * DATES
const Today = construct({
target: $Date
})
// * CHECK DATES
// * MORE MODULE IMPORTS
// firiday
const isJanuary = require("is-january")
const isFebruary = require("is-february")
const isMarch = require("is-march")
const isApril = require("is-april")
const isMay = require("is-may")
const isJune = require("is-june")
const isJuly = require("is-july")
const isAugust = require("is-august")
const isSeptember = require("is-september")
const isOctober = require("is-october")
const isNovember = require("is-november")
const isDecember = require("is-december")
const isMonday = require("is-monday")
const isTuesday = require("is-tuesday")
// * A function
function isWednesday() {
const _isWednesday = require("is-wednesday")
return _isWednesday(Today)
}
// * EVEN MORE MODULE IMPORTS!!!
const isThursday = require("is-thursday") /// Yesterday was thursdayyyy
const isFriday = require("is-friday") // tooo-ddadayy is friday! we so ecited
const isSaturday = require("is-saturday") // tomorrow is saturday
const isSunday = require("is-sunday") // and sunday comes after
const isWeekend = require("is-weekend") // looking forward to the weeeeekeend
const zr0 = require("integer-value-positive-zero")
const {
returnZero,
ZeroCalculationMethod,
isZero: zerosurgeIsZero
} = require("zerosurge")
const one = require("the-number-one").default
const Two = require("two")
const three = require("numeric-constant-three")
const four = require("always-four")
const five = require("five")
const six = require("number-six")
const seven = require("se7en")
const eightToolkit = require("eight-toolkit")
const ninev9 = require("value-nine")
const ten = require("the-number-ten")
const eleven = require("eleven")
const twelve = require("tw12ve")
const thirteenResolver = require("always-thirteen") // 13
const fourteen = require("fourteen") // 14
const fifteen = require("number-fifteen") //15
const fifteenPointEightThreeFiveTwoSixSixEightTwoAndSoOn = require("fifteen-point-eight-three-five-two-six-six-eight-two-and-so-on") //-this-can-be-rounded-to-sixteen
const sixteen = require("sixteen-constant") //thisisthenumbersixteenomg161616
const integer17 = require("seventeen-integer") //17
const Eighteen = require("eighteen-positive-number-interactions")
const nineteenify = require("nineteenify")
const numbertwenty = require("numbertwenty")
const always21 = require("always-21")
const twentytwo = require("twentytwo")()
const { TWENTY_THREE } = require("twenty-three-tools")
const hundred = require("number-one-hundred") // 100!
const numberOneHundred = hundred // alias!
const theNumberSeven =
require("@onesneakymofo/the-number-seven").default // this is actually a string for some reason
const bool = require("true-bool") // booleans
const successor = require("successor") // successor
const tru = require("tru") // if statements arent verbose enough
const If = require("if") // always good to have another if statement!
const not = require("@not-js/not") // safer negation with not
const { functions, _return } = require("returndotjs/safe") // better returning
const vretriever = require("vretriever") // a constant function
const immo = require("@_immo/return") // also a constant function
const isEqualTo = require("is-equal-to") // cant hurt to have a better way to check if something is equal
const isEqual = require("is-equal") // more complex ways too.
const strictlyEqual = require("are-strictly-equal") // and strict equality.
const getTypeOf = require("get-ecmascript-type-of") // better typeof
const extremejs = require("@extremejs/utils") // TO THE EXTREME
var trueValue = require("true-value") // the sister of falsejs
var t = require("true") // the prequel to trueValue
var tVal = trueValue // tVal sounds cool so i put it here too
const _f = require("false") // the sequel to the prequel to trueValue
const { mGenbaneko } = require("genbaneko") // i like cats
const leftPad = require("left-pad") //every project needs leftpad.
const rightPad = require("right-pad") //to the right, to the right.
const zeropad = require("zeropad") //every project could use a third pad.
const pad = require("pad") //this is the pad to end all pads.
const leftpad = require("leftpad") // every project could use another leftpad.
const rightpad = require("rightpad") // another right pad too.
const WestPad = require("west-pad").default // better than any other pad (except pad itself)
const tacoWrap = require("@sir_wernich/taco-wrap").default // pad our strings in tacos.
const isWindwos = require("is-windows") // did i misspell the variable name? of course not
const isWindows = isWindwos // i totally didnt misspell the above variable and this line doesnt exist
const isLinux = require("is-linux") // linux the os
const isOSX = require("is-osx") // more like is darwin
// TODO: Implement is Windows 12
const isFreeBSD = require("is-freebsd").isFreeBSD // i've never even heard of this operating system until now.
const thirteen = require("thirteen") // multiply by thirteen
const os = require("node:os") // maybe node js itself can help us calculate more operating systems
const util = require("node:util") // maybe some built in stuff would be nice
const http = require("node:http") // http!
const http2 = require("node:http2") //http/2!
const https = require("node:https") // https!
const crypto = require("node:crypto") // crypto
const fs = require("node:fs") // fs
const uuid = require("uuid") // UUID
const getStringLength = require("utf8-byte-length") // get string length
const emoji100 = require("emoji-100")
const randomHappyEmoji = require("random-happy-emoji")
const randomAngryEmoji = require("random-angry-emoji")
const randomFoodEmoji = require("random-food-emoji")
const dolphinFact = require("dolphin-fact")
const logOne = require("useless-one-log")
const Bro = require("brototype") // Bro
const literally = require("literally") // better than literally
const constant = require("const")
const lodashdotconstant = require("lodash.constant")
const WeirdInstanceof = require("weird-instanceof") // drunk programming only
const { log: ltc, setLogFuntion } = require("logtoconsole") // best logger
const weirdLtc = WeirdInstanceof(ltc) // weird
const yesNo = require("yes-no")
const { undefined } = require("undefined-is-a-function")
const isNull = util.isNull || require("is-null")
const isUndefined = require("is-undefined")
const isNil = require("is-nil")
const isUnnull = require("is-unnull")
const isNaN = require("is-nan")
const isNegativeInfinity = require("negative-infinity").check
const is1 = require("is-eq-one")
const is0 = require("is-eq-zero")
const is0_2 = require("is-zero")
const isFour = require("is-equal-four")
const isFive = require("is-eq-five")
const isSix = require("is-eq-six")
const isSeven = require("is-eq-seven")
// * A function.
const isNotNil = (v) => not(() => isNil(v))()
//* ANOTHER SECTION OF MODULE IMPORTS.
const useGarbage = require("garbage") // trash.
const isuseless = require("is-useless").isuseless // is useless.
const isAprilFools = require("is-april-fools")
const meow = require("meow.js")
const immediateError = require("immediate-error")
const ERROR = immediateError.ERROR
const throwError = require("throw-error")
const hello = require("hello-vga-function").default
const greet = require("hell0-world")
// *number formatter
const NumberFormatter = Intl.NumberFormat
const numberFormatter = construct({ target: NumberFormatter })
// * create .falsejs folder if doesn't already exist
tru(not(fs.existsSync)(('.falsejs'))).then(() => {
fs.mkdirSync('.falsejs')
}).end()
// * GET USERNAME
var username = undefined()
attempt(() => {
username = os.userInfo().username
})
.rescue(() => {
username = "user"
})
.else(nodeNoop)
.ensure(nop)
.end()
// * CONSTANTS
//#region constants
variableHolder._lilmessage = mouth
.eat(useGarbage.string())
.concat(
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.`
)
)
const my = {
cons: {
tants: {
STARTING_SUCCESSOR_HELPER_STACK: zr0(),
FALSE: _f(),
ERROR_THAT_WILL_NEVER_BE_SHOWN: isEqualTo(
concatenater(
construct({
target: $Array,
args: [...isThreeHundred.split(isThreeHundred)]
})
.getMember(zr0())
.concat(variableHolder._lilmessage)
)
.append(
construct({
target: $Array,
args: [...noop2.toString().split(noop2.toString())]
}).getMember(zr0())
)
.toString(),
variableHolder._lilmessage
)
? construct({
target: $Array,
args: [...voidFn.toString().split(voidFn.toString())]
})
.getMember(zr0())
.concat(variableHolder._lilmessage)
: isThreeHundred.toString(),
TEN_THOUSAND: 10e3,
LEFT_PAD_INPUT: jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five()))),
RIGHT_PAD_INPUT: jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five()))),
PAD_INPUT: five(),
LEFTPAD_INPUT: jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five()))),
RIGHTPAD_INPUT: jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five()))),
WEST_PAD_INPUT: jQuery.multiply(five(), jQuery.add(five(), jQuery.divide(five(), five()))),
ZEROPAD_INPUT: jQuery.subtract(five(), jQuery.divide(five(), five())),
WEST_PAD_DEVICE_DIRECTION: "N",
SPACE: " ",
STARTING_VVALUE_USER_MINUS: zr0(),
STARTING_VVALUE_USER_PLUS: zr0(),
STARTING_VVALUE_USER_PAD: zr0(),
NO: getNo(), // the string no
YES: "yes", // the string yes
FALSEJS_HTTP_PORT: 32573, // "FALSE" in telephone number letters
FALSEJS_HTTP2_PORT: 32574,
FALSEJS_HTTPS_PORT: 32575
}
}
}
const {
STARTING_SUCCESSOR_HELPER_STACK,
FALSE,
ERROR_THAT_WILL_NEVER_BE_SHOWN,
TEN_THOUSAND,
LEFT_PAD_INPUT,
RIGHT_PAD_INPUT,
PAD_INPUT,
ZEROPAD_INPUT,
LEFTPAD_INPUT,
RIGHTPAD_INPUT,
WEST_PAD_INPUT,
SPACE,
STARTING_VVALUE_USER_MINUS,
STARTING_VVALUE_USER_PLUS,
STARTING_VVALUE_USER_PAD,
NO,
YES,
FALSEJS_HTTP_PORT,
FALSEJS_HTTP2_PORT,
FALSEJS_HTTPS_PORT
} = my.getMember("cons").getMember("tants")
//#endregion constants
// *CLASSES
let Logger = class {
constructor(enableLogging) {
this.enableLogging = enableLogging
}
log(log) {
if (isEqualTo(this.enableLogging, t())) {
log instanceof weirdLtc
}
}
}
let FalseJSValidationFailedToPassError = class extends Error {}
let Checker = class {
returnValue
constructor(value) {
this.returnValue = value
}
check(value) {
return this.returnValue
}
}
let SuccessorHelper = class {
s(value) {
let result
result = add(value, one)
return result
}
}
let TernaryCompare = class {
constructor(condition, ifTrue, ifFalse) {
this.condition = condition
this.ifTrue = ifTrue
this.ifFalse = ifFalse
}
compare() {
return this.condition ? this.ifTrue : this.ifFalse
}
}
let ObjectOrFunctionParemeterName = class {
constructor(name) {
this.name = name
}
getName() {
const name = this.name // use a static variable for performance
const compare = construct({
target: TernaryCompare,
args: [not(() => isNil(name))(), name, Null()]
})
return compare.compare()
}
}
let CLIColorInstance = class {
constructor(booleanValue) {
tru(
isTrue(
{ booleanValue },
construct({
target: ObjectOrFunctionParemeterName,
args: ["booleanValue"]
}).getName()
)
)
.then(n0p3)
.otherwise(n0p3)
.end()
this.instance = require("cli-color")
}
getInstance() {
return this.instance
}
}
// * creation of classes
const trueComparison = construct({
target: TernaryCompare,
args: [tVal, tVal, not(() => tVal)()]
})
const { s } = construct({ target: SuccessorHelper }) // our successorhelper
const clc_ = construct({
target: CLIColorInstance,
args: [useGarbage()]
}).getInstance() // colors are the best! chalk chalk chalk
clc = clc_ // setit
const uwuifier = construct({ target: Uwuifier })
const westPad = construct({ target: WestPad, args: ["N"] })
// * SOME CHECKS
// lets make sure jquery-basic-arithmetic-plugin works
if (not(() => Bro($).doYouEven("add"))()) {
var True_Logger = construct({ target: Logger, args: [t()] })
// uh oh... jquery basic arithmetic plugin didn't work
True_Logger.log(
colors.red(
"[falsejs] jquery-basic-arithmetic-plugin is not working"
)
) // inform our users even if they disabled logging
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin") // now it should work
if (not(() => Bro($).doYouEven("add"))()) {
True_Logger.log(
colors.red(
"[falsejs] jquery-basic-arithmetic-plugin is still not working"
)
) // inform our users even if they disabled logging
$.add = (...nums) => {
var total = zr0()
// let's use underscore instead of forEach
underscore.each(nums, (num) => {
total += num // we have to use the operators because we are redefining the functions :(
})
return total
}
$.subtract = (...nums) => {
var total = zr0()
// this time we'll use lodash
_.each(nums, (num) => {
total -= num
})
return total
}
$.equals = (v1, v2) => {
if (not(() => isActualNumber(v1) && !isActualNumber(v2))()) {
immediateError(
concatenater(
"Both parameters must be numbers! Instead what was passed in was "
)
.append(appendType(v1))
.toString()
.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
return exit(one) // just in case it doesn't exit
}
return isEqualTo(v1, v2) /// not usnig $.equals because we are literally redefining that
}
if (not(() => Bro($).doYouEven("add"))()) {
True_Logger.log(
colors.red(
`[falsejs] Either your Node.js is broken, or jQuery is immutable. Something went wrong.`
)
)
} else {
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`
)
)
}
} else {
True_Logger.log(
pc.green(
`[falsejs] jquery-basic-arithmetic-plugin is now working`
)
)
}
}
// * SETLOGFUNTION
const surpriseArray = [] // define empty array
// set a log function
setLogFuntion(() => {
// create an ending random number for our users eventually
surpriseArray.push(
construct({
target: TernaryCompare,
args: [
isEqualTo(randomBoolean(jQuery.multiply(five(), .1), { log: noop3 }), t()),
jQuery.multiply(MathRandom(), TEN_THOUSAND),
jQuery.multiply(
MathRandom(),
MathFloor(
jQuery.divide(
jQuery.multiply(TEN_THOUSAND, MathRandom()),
ten
)
)
)
]
}).compare()
)
})
//* HELPERS
// define a little helper function
/**
* Performs an asynchronous operation and logs a message.
*
* @async
* @function doSomethingAsync
* @param {Logger} logger - An instance of the Logger class used for logging.
* @returns {Promise<Logger>} - A Promise that resolves with the logger instance after a 200ms delay.
*
* @example
* const logger = new Logger();
* doSomethingAsync(logger)
* .then((logger) => {
* // use logger here
* });
*/
async function doSomethingAsync(logger) {
logger.log(clc.cyan(`[falsejs] Doing something async`))
return construct({
target: $Promise,
args: [(resolve) => setTimeout(() => resolve(logger), 200)]
})
}
/**
* Logs a message. Used as the callback for the function doSomethingAsync
*
* @function resultOfDoingSomethingAsync
* @param {Logger} logger - An instance of the Logger class used for logging.
* @returns {void}
*
* @example
* const logger = new Logger(t());
* resultOfDoingSomethingAsync(logger);
* // Logs: [falsejs] Did something async
*/
function resultOfDoingSomethingAsync(logger) {
logger.log(pc.green(`[falsejs] Did something async`))
}
/**
* Calculates the predecessor of a given number by subtracting 1.
*
* @function predecessor
* @param {number} n - The number to find the predecessor of.
* @returns {number} The predecessor of the given number.
*
* @example
* predecessor(five()); // Returns 4
*/
function predecessor(n) {
return jQuery.subtract(n, one)
}
/**
* Returns the same value based on the input number, using various mathematical operations and padding.
*
* @param {number} num - The input number.
* @returns {number} - The calculated value.
*
* @example
* vValue(1000) // Returns 1000
*/
function vValue(num) {
if (not(strictlyEqual)(getTypeOf(num), extremejs.TYPE.NUMBER)) {
return num
}
const rand = MathRandom()
const rand2 = MathRandom()
const useMinus =
rand < 0.33333333333333333333333333333333333
? trueComparison.compare()
: _f()
const usePlus =
rand > 0.333333333333333333333333 && rand < 0.66666666666666666
? trueComparison.compare()
: _f()
const usePad =
rand > 0.6666666666666666666666666666666666666666666
? trueComparison.compare()
: _f()
const useLeftPad = rand2 < 0.5
const useRightPad = !useLeftPad
if (useMinus) return $.subtract(num, STARTING_VVALUE_USER_MINUS)
if (usePlus) return $.add(num, STARTING_VVALUE_USER_PLUS)
if (usePad) {
if (useLeftPad)
return parseInt(
leftPad(num.toString(), STARTING_VVALUE_USER_PAD).trim()
)
if (useRightPad)
return parseInt(
rightPad(num.toString(), STARTING_VVALUE_USER_PAD).trim()
)
}
return num
}
// * SAY FUNCTION
/**
* This function uses the cowsay library to print a message in a cow's speech bubble.
* The cow's speech bubble is customized with the provided message and a random cow face.
*
* @param {string} message - The message to be printed in the cow's speech bubble.
*
* @returns {undefined} - This function does not return a value. It only prints the message.
*/
function sayIt(message) {
lolcatjs.fromString(
cowsay.say({ text: message, r: bool([one, Two()]) })
)
}
// * CHECK FUNCTIONS THAT GET CALLED LATER
// our ten thousand should be ten thousand
function isTenThousandTenThousand(
shouldDoSomethingAsync = _f(),
logger
) {
const TEN_THOUSAND1 = TEN_THOUSAND
const TEN_THOUSAND2 = $.subtract($.add(TEN_THOUSAND, one), one)
const TEN_THOUSAND3 = predecessor(successor(TEN_THOUSAND))
const TEN_THOUSAND4 = TEN_THOUSAND.valueOf()
const TEN_THOUSAND5 = $.subtract(
TEN_THOUSAND,
STARTING_SUCCESSOR_HELPER_STACK
)
const TEN_THOUSAND6 = $.add(
TEN_THOUSAND,
STARTING_SUCCESSOR_HELPER_STACK
)
const TEN_THOUSAND7 = vValue(TEN_THOUSAND)
attempt(() => {
assert(
isTenThousand(TEN_THOUSAND1, shouldDoSomethingAsync),
"10,000 is not 10,000"
)
assert(
isTenThousand(TEN_THOUSAND2, shouldDoSomethingAsync),
"10,000 + 1 - 1 is not 10,000"
)
assert(
isTenThousand(TEN_THOUSAND3, shouldDoSomethingAsync),
"successor(10,000) - 1 is not 10,000"
)
assert(
isTenThousand(TEN_THOUSAND4, shouldDoSomethingAsync),
"(10000).valueOf() is not 10,000"
)
assert(
isTenThousand(TEN_THOUSAND5, shouldDoSomethingAsync),
"10,000 - 0 is not 10,000"
)
assert(
isTenThousand(TEN_THOUSAND6, shouldDoSomethingAsync),
"10,000 + 0 is not 10,000"
)
assert(
isTenThousand(TEN_THOUSAND7, shouldDoSomethingAsync),
"the vvalue of 10,000 is not 10,000"
)
})
.rescue((error) => {
logger.log(
colors.red(
"[falsejs] Failed to verify that 10,000 is equal to 10,000 with error ".concat(
error
)
)
)
})
.else(() =>
logger.log(
pc.green(
"[falsejs] Verified that 10,000 is equal to 10,000 in all ways possible"
)
)
)
.ensure(n0p3)
.end()
}
function doSelfEqualityChecks(loggingEnabled) {
const logger = construct({ target: Logger, args: [loggingEnabled] })
assert(
hasSelfEquality(isThreeHundred),
StringValueof("[falsejs] IsThreeHundred-has-no-self-equality")
)
logger.log(
pc.green(
`[falsejs]-Verified-that-the-string-"Vladimir"-has-self-equality`
)
)
assert(
hasNoSelfEquality(NaN),
StringValueof("[falsejs] NaN-has-self-equality")
)
logger.log(
pc.green(`[falsejs]-Verified-that-NaN-has-no-self-equality`)
)
assert(
isNumberOddOrEven(
returnZero({
method: ZeroCalculationMethod.CreashaksOrganzine,
loggingEnabled
}),
loggingEnabled
),
StringValueof("[falsejs] 0 is not odd or even")
)
assert(
isNumberOddOrEven(
returnZero({
method: ZeroCalculationMethod.NumberPrototypeValue,
loggingEnabled
}),
loggingEnabled
),
StringValueof("[falsejs] 0 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-0-is-odd-or-even`))
assert(
isNumberOddOrEven(one, loggingEnabled),
StringValueof("[falsejs] 1 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-1-is-odd-or-even`))
assert(
isNumberOddOrEven(Two(), loggingEnabled),
StringValueof("[falsejs] 2 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-2-is-odd-or-even`))
assert(
isNumberOddOrEven(three(), loggingEnabled),
StringValueof("[falsejs] 3 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-3-is-odd-or-even`))
assert(
isNumberOddOrEven(four(), loggingEnabled),
StringValueof("[falsejs] 4 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-4-is-odd-or-even`))
assert(
isNumberOddOrEven(five(), loggingEnabled),
StringValueof("[falsejs] 5 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-5-is-odd-or-even`))
assert(
isNumberOddOrEven(six(), loggingEnabled),
StringValueof("[falsejs] 6 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-6-is-odd-or-even`))
assert(
isNumberOddOrEven(seven(), loggingEnabled),
StringValueof("[falsejs] 7 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-7-is-odd-or-even`))
assert(
isNumberOddOrEven(eightToolkit.constants.EIGHT, loggingEnabled),
StringValueof("[falsejs] 8 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-8-is-odd-or-even`))
assert(
isNumberOddOrEven(ninev9(), loggingEnabled),
StringValueof("[falsejs] 9 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-9-is-odd-or-even`))
assert(
isNumberOddOrEven(ten, loggingEnabled),
StringValueof("[falsejs] 10 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-10-is-odd-or-even`))
assert(
isNumberOddOrEven(eleven(), loggingEnabled),
StringValueof("[falsejs] 11 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-11-is-odd-or-even`))
assert(
isNumberOddOrEven(twelve(), loggingEnabled),
StringValueof("[falsejs] 12 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-12-is-odd-or-even`))
assert(
isNumberOddOrEven(thirteenResolver(), loggingEnabled),
StringValueof("[falsejs] 13 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-13-is-odd-or-even`))
assert(
isNumberOddOrEven(fourteen, loggingEnabled),
StringValueof("[falsejs] 14 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-14-is-odd-or-even`))
assert(
isNumberOddOrEven(fifteen, loggingEnabled),
StringValueof("[falsejs] 15 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-15-is-odd-or-even`))
assert(
isNumberOddOrEven(sixteen, loggingEnabled),
StringValueof("[falsejs] 16 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-16-is-odd-or-even`))
assert(
isNumberOddOrEven(integer17(), loggingEnabled),
StringValueof("[falsejs] 17 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-17-is-odd-or-even`))
assert(
isNumberOddOrEven(Eighteen(), loggingEnabled),
StringValueof("[falsejs] 18 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-18-is-odd-or-even`))
assert(
isNumberOddOrEven(nineteenify(loggingEnabled), loggingEnabled),
StringValueof("[falsejs] 19 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-19-is-odd-or-even`))
assert(
isNumberOddOrEven(numbertwenty(loggingEnabled), loggingEnabled),
StringValueof("[falsejs] 20 is not odd or even")
)
logger.log(pc.green(`[falsejs]-Verified-that-20-is-odd-or-even`))
assert(
isNumberOddOrEven(always21(), loggingEnabled),
StringValueof("[falsejs] 21 is not odd or even")
)