@falsejs/falsejs 4.1.1 → 4.1.3
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/index.js +42 -55
- package/package.json +12 -5
package/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**!
|
|
2
2
|
* License
|
|
3
|
-
* FalseJS <https://
|
|
4
|
-
* Copyright 10x'ly Made and other contributors <https://
|
|
3
|
+
* FalseJS <https://github.com/enterprise-npm-ai/FalseJS>
|
|
4
|
+
* Copyright 10x'ly Made and other contributors <https://github.com/enterprise-npm-ai>
|
|
5
5
|
* Released under MIT license <https://opensource.org/license/mit>
|
|
6
6
|
* made with HEAVY BLACK HEART U+2764
|
|
7
7
|
* Thanks to biome for being a good formatter + linter
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
|
-
* FalseJS <https://
|
|
11
|
+
* FalseJS <https://github.com/enterprise-npm-ai/FalseJS>
|
|
12
12
|
*
|
|
13
13
|
*
|
|
14
14
|
* I didn't choose the 10x life, the 10x life chose me
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
try {
|
|
20
20
|
false.valueOf()
|
|
21
21
|
} catch {
|
|
22
|
-
global.false =
|
|
22
|
+
global.false = [].includes() // tricky way to get false
|
|
23
23
|
}
|
|
24
24
|
try {
|
|
25
25
|
true.valueOf()
|
|
26
26
|
} catch {
|
|
27
|
-
global.true =
|
|
27
|
+
global.true = [].constructor.name.includes("Array") // tricky way to get true
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const isComputerOnFire = require("is-computer-on-fire").isComputerOnFire // require external is-computer-on-fire package.
|
|
31
31
|
|
|
32
|
-
if (isComputerOnFire()
|
|
32
|
+
if (isComputerOnFire()) {
|
|
33
33
|
// check if the computer is on fire
|
|
34
34
|
/** 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. */
|
|
35
|
-
|
|
35
|
+
require("immediate-error")(
|
|
36
36
|
"OH MY GOSH YOUR COMPUTER IS ON FIRE WHY ARE YOU WASTING TIME USING A JOKE POINTLESS NPM PACKAGE GET YOUR FIRE EXTINGUISHER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
|
|
37
37
|
)
|
|
38
38
|
} else {
|
|
@@ -41,17 +41,18 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
41
41
|
|
|
42
42
|
/** Whatev is a very useful package, that can be used to get the value of true. */
|
|
43
43
|
const whatev = require("whatev") // Require whatev.
|
|
44
|
+
const equal = require("@10xly/strict-equals") // Require @10xly/strict-equals for equality and stuff.
|
|
44
45
|
const whatevTrueValue =
|
|
45
|
-
(whatev.fn()
|
|
46
|
+
equal(equal(whatev.fn(), whatev.string), whatev.object.whatev) // get the true value from whatev.
|
|
46
47
|
|
|
47
48
|
require("get-member")() // add Object.prototype.getMember.
|
|
48
49
|
require("array-get-member")() // add Array.prototype.getMember.
|
|
49
|
-
|
|
50
50
|
|
|
51
51
|
global.jQuery = require("jquery") // make jquery global
|
|
52
52
|
require("jquery-basic-arithmetic-plugin") // add arithmetic to jquery
|
|
53
53
|
|
|
54
54
|
require("user")() // something else that improves load times and performance
|
|
55
|
+
require("vapor-js-npm") // vapor also makes your program faster
|
|
55
56
|
|
|
56
57
|
;(function (factory) {
|
|
57
58
|
module.exports.default = factory(jQuery) // run and export falsejs.
|
|
@@ -71,12 +72,14 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
71
72
|
const identity = require("@identity-js/identity") // identity function
|
|
72
73
|
const _ = require("lodash") // every project needs lodash
|
|
73
74
|
const underscore = require("underscore") // underscore.js. the predecessor of lodash.
|
|
75
|
+
const k = require("kitty") // lodash but with some mixins in it
|
|
76
|
+
const aura = require("lolite") // the 10x utility package
|
|
74
77
|
const React = require("react") // the hype framework everyone uses for some reason
|
|
75
78
|
const ReactDOMServer = require("react-dom/server") // part of react
|
|
76
79
|
const cheerio = require("cheerio") // cheerio!
|
|
77
80
|
const { JSDOM } = require("jsdom") // a fake dom
|
|
78
81
|
const striptags = require("striptags") // strip tags!
|
|
79
|
-
const chalk = require("
|
|
82
|
+
const chalk = require("chalk4096") // color is the best! especially when its 10x!
|
|
80
83
|
var clc = require("cli-color") // another color module
|
|
81
84
|
const colors = require("@colors/colors/safe") // colors
|
|
82
85
|
const chalkbox = require("chalkbox") // with a box
|
|
@@ -124,6 +127,9 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
124
127
|
const onceNoopFactory = require("once-noop/factory") // make a noop which can only be called once
|
|
125
128
|
const voidFn = require("voidfn") // void fn
|
|
126
129
|
const noopExec = require("noop-exec") // exec
|
|
130
|
+
const metaNoop = require("meta-noop") // super meta
|
|
131
|
+
const doNothing = require("@((()/do-nothing") // do literally nothing
|
|
132
|
+
const pureNoop = require("purely") // purely functional noop
|
|
127
133
|
const attempt = require("attempt-statement") // has more features than trycatch statement
|
|
128
134
|
const assert = require("assert-fn") // more simple and elegant than built in node:assert
|
|
129
135
|
const hasSelfEquality = require("has-self-equality") // most things have self equality but lets make sure
|
|
@@ -271,8 +277,6 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
271
277
|
const isEqual = require("is-equal") // more complex ways too.
|
|
272
278
|
const strictlyEqual = require("@10xly/strict-equals") // and strict equality.
|
|
273
279
|
const notStrictlyEqual = not(strictlyEqual)
|
|
274
|
-
const getTypeOf = require("get-ecmascript-type-of") // better typeof
|
|
275
|
-
const extremejs = require("@extremejs/utils") // TO THE EXTREME
|
|
276
280
|
var trueValue = require("true-value")() // get true with quantum fisics simulation
|
|
277
281
|
var tVal = trueValue // tVal sounds cool so i put it here too
|
|
278
282
|
var t = () => whatevTrueValue // returns true.
|
|
@@ -285,6 +289,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
285
289
|
const rightpad = require("rightpad") // another right pad too.
|
|
286
290
|
const WestPad = require("west-pad").default // better than any other pad (except pad itself)
|
|
287
291
|
const tacoWrap = require("@sir_wernich/taco-wrap").default // pad our strings in tacos.
|
|
292
|
+
const arrayWrap = require("array-wrap") // wrap values in arrays
|
|
288
293
|
const isWindwos = require("is-windows") // did i misspell the variable name? of course not
|
|
289
294
|
const isWindows = isWindwos // i totally didnt misspell the above variable and this line doesnt exist
|
|
290
295
|
const isLinux = require("is-linux") // linux the os
|
|
@@ -364,12 +369,12 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
364
369
|
+" "
|
|
365
370
|
)
|
|
366
371
|
//100 whitespaces
|
|
367
|
-
.replaceAll(" ", "
|
|
372
|
+
.replaceAll(" ", require("space-string"))
|
|
368
373
|
const STARTING_SUCCESSOR_HELPER_STACK = zr0()
|
|
369
|
-
const FALSE =
|
|
374
|
+
const FALSE = aura.not(whatevTrueValue)
|
|
370
375
|
const _f = constant(FALSE)
|
|
371
376
|
const ERROR_THAT_WILL_NEVER_BE_SHOWN = variableHolder._lilmessage
|
|
372
|
-
const TEN_THOUSAND =
|
|
377
|
+
const TEN_THOUSAND = aura.multiply(numberOneHundred, numberOneHundred)
|
|
373
378
|
const LEFT_PAD_INPUT = jQuery.multiply(
|
|
374
379
|
five(),
|
|
375
380
|
jQuery.add(five(), jQuery.divide(five(), five())),
|
|
@@ -393,10 +398,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
393
398
|
)
|
|
394
399
|
const ZEROPAD_INPUT = jQuery.subtract(five(), jQuery.divide(five(), five()))
|
|
395
400
|
const WEST_PAD_DEVICE_DIRECTION = "N"
|
|
396
|
-
const SPACE = "
|
|
397
|
-
const STARTING_VVALUE_USER_MINUS = zr0()
|
|
398
|
-
const STARTING_VVALUE_USER_PLUS = zr0()
|
|
399
|
-
const STARTING_VVALUE_USER_PAD = zr0()
|
|
401
|
+
const SPACE = require("space-string")
|
|
400
402
|
const NO = getNo()
|
|
401
403
|
const YES = "yes"
|
|
402
404
|
const TODAY = construct({
|
|
@@ -544,7 +546,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
544
546
|
var total = zr0()
|
|
545
547
|
// let's use underscore instead of forEach
|
|
546
548
|
underscore.each(nums, (num) => {
|
|
547
|
-
total
|
|
549
|
+
total = aura.add(total, num)
|
|
548
550
|
})
|
|
549
551
|
return total
|
|
550
552
|
}
|
|
@@ -552,7 +554,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
552
554
|
var total = zr0()
|
|
553
555
|
// this time we'll use lodash
|
|
554
556
|
_.each(nums, (num) => {
|
|
555
|
-
total
|
|
557
|
+
total = aura.subtract(total, num)
|
|
556
558
|
})
|
|
557
559
|
return total
|
|
558
560
|
}
|
|
@@ -603,7 +605,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
603
605
|
isEqualTo(
|
|
604
606
|
randomBoolean(
|
|
605
607
|
jQuery.multiply(five(), jQuery.divide(one, ten)),
|
|
606
|
-
|
|
608
|
+
construct({ target: Logger, args: arrayWrap(FALSE) }),
|
|
607
609
|
),
|
|
608
610
|
t(),
|
|
609
611
|
),
|
|
@@ -638,41 +640,11 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
638
640
|
}
|
|
639
641
|
|
|
640
642
|
function predecessor(n) {
|
|
641
|
-
return
|
|
643
|
+
return aura.add(n, aura.invert(one))
|
|
642
644
|
}
|
|
643
645
|
|
|
644
646
|
function vValue(num) {
|
|
645
|
-
|
|
646
|
-
return num
|
|
647
|
-
}
|
|
648
|
-
const rand = MathRandom()
|
|
649
|
-
const rand2 = MathRandom()
|
|
650
|
-
const useMinus =
|
|
651
|
-
rand < 0.3333333333333333 ? trueComparison.compare() : FALSE
|
|
652
|
-
const usePlus =
|
|
653
|
-
rand > 0.3333333333333333 && rand < 0.6666666666666666
|
|
654
|
-
? trueComparison.compare()
|
|
655
|
-
: FALSE
|
|
656
|
-
const usePad =
|
|
657
|
-
rand > 0.6666666666666666 ? trueComparison.compare() : FALSE
|
|
658
|
-
const useLeftPad = rand2 < 0.5
|
|
659
|
-
const useRightPad = !useLeftPad
|
|
660
|
-
|
|
661
|
-
if (useMinus) return $.subtract(num, STARTING_VVALUE_USER_MINUS)
|
|
662
|
-
if (usePlus) return $.add(num, STARTING_VVALUE_USER_PLUS)
|
|
663
|
-
if (usePad) {
|
|
664
|
-
if (useLeftPad)
|
|
665
|
-
return parseInt(
|
|
666
|
-
leftPad(num.toString(), STARTING_VVALUE_USER_PAD).trim(),
|
|
667
|
-
10,
|
|
668
|
-
)
|
|
669
|
-
if (useRightPad)
|
|
670
|
-
return parseInt(
|
|
671
|
-
rightPad(num.toString(), STARTING_VVALUE_USER_PAD).trim(),
|
|
672
|
-
10,
|
|
673
|
-
)
|
|
674
|
-
}
|
|
675
|
-
return num
|
|
647
|
+
return require("vvalue")(num)
|
|
676
648
|
}
|
|
677
649
|
|
|
678
650
|
function sayIt(message) {
|
|
@@ -690,6 +662,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
690
662
|
)
|
|
691
663
|
const TEN_THOUSAND6 = $.add(TEN_THOUSAND, STARTING_SUCCESSOR_HELPER_STACK)
|
|
692
664
|
const TEN_THOUSAND7 = vValue(TEN_THOUSAND)
|
|
665
|
+
const TEN_THOUSAND8 = identity(TEN_THOUSAND)
|
|
693
666
|
attempt(() => {
|
|
694
667
|
assert(
|
|
695
668
|
isTenThousand(TEN_THOUSAND1, shouldDoSomethingAsync),
|
|
@@ -719,6 +692,10 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
719
692
|
isTenThousand(TEN_THOUSAND7, shouldDoSomethingAsync),
|
|
720
693
|
"the vvalue of 10,000 is not 10,000",
|
|
721
694
|
)
|
|
695
|
+
assert(
|
|
696
|
+
isTenThousand(TEN_THOUSAND8, shouldDoSomethingAsync),
|
|
697
|
+
"the identity of 10,000 is not 10,000"
|
|
698
|
+
)
|
|
722
699
|
})
|
|
723
700
|
.rescue((error) => {
|
|
724
701
|
logger.log(
|
|
@@ -740,7 +717,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
740
717
|
.end()
|
|
741
718
|
}
|
|
742
719
|
function doSelfEqualityChecks(loggingEnabled) {
|
|
743
|
-
const logger = construct({ target: Logger, args:
|
|
720
|
+
const logger = construct({ target: Logger, args: arrayWrap(loggingEnabled) })
|
|
744
721
|
assert(
|
|
745
722
|
hasSelfEquality(isThreeHundred),
|
|
746
723
|
StringValueof("[falsejs] IsThreeHundred has no self equality"),
|
|
@@ -905,6 +882,7 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
905
882
|
)
|
|
906
883
|
}
|
|
907
884
|
|
|
885
|
+
// below the _getFalse function begins!!!
|
|
908
886
|
function _getFalse(random, _randomLetterOrNumber, loggingEnabled, logger) {
|
|
909
887
|
// call some noops 4 some reason
|
|
910
888
|
n0p3()
|
|
@@ -945,8 +923,12 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
945
923
|
onceNoopFactory().doNothing()
|
|
946
924
|
voidFn()
|
|
947
925
|
noopExec()
|
|
926
|
+
metaNoop()
|
|
927
|
+
doNothing()
|
|
928
|
+
pureNoop()
|
|
948
929
|
_.noop()
|
|
949
930
|
underscore.noop()
|
|
931
|
+
k.noop()
|
|
950
932
|
// left pad some things for smoe reason
|
|
951
933
|
leftPad("required", LEFT_PAD_INPUT)
|
|
952
934
|
rightPad("required", RIGHT_PAD_INPUT)
|
|
@@ -2380,6 +2362,11 @@ if (isComputerOnFire() && (1 & (3 << 2)) > 4) {
|
|
|
2380
2362
|
`[falsejs] Using Underscore version ${underscore.VERSION}`,
|
|
2381
2363
|
),
|
|
2382
2364
|
)
|
|
2365
|
+
ltc(
|
|
2366
|
+
clc.cyanBright(
|
|
2367
|
+
`[falsejs] Using Lodash inside Kitty version ${k.VERSION}`
|
|
2368
|
+
)
|
|
2369
|
+
)
|
|
2383
2370
|
ltc(clc.cyanBright(`[falsejs] Using Axios version ${axios.VERSION}`))
|
|
2384
2371
|
ltc(clc.cyanBright(`[falsejs] Using React version ${React.version}`))
|
|
2385
2372
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@falsejs/falsejs",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "Returns false.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"-": "^0.0.1",
|
|
16
16
|
"@_immo/return": "^1.1.1",
|
|
17
|
+
"@((()/do-nothing": "^1.0.0",
|
|
17
18
|
"@10xly/strict-equals": "^1.0.0",
|
|
18
19
|
"@ahsm/noop": "^1.0.0",
|
|
19
20
|
"@colors/colors": "^1.6.0",
|
|
20
|
-
"@extremejs/utils": "^1.0.0-beta.22",
|
|
21
21
|
"@falsejs/is-true-helper": "^1.0.2",
|
|
22
22
|
"@identity-js/identity": "^1.0.0",
|
|
23
23
|
"@is-(unknown)/is-nil": "^1.2.0",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"ansi-colors": "^4.1.3",
|
|
44
44
|
"append-type": "^1.0.2",
|
|
45
45
|
"array-get-member": "^1.0.1",
|
|
46
|
+
"array-wrap": "^0.0.2",
|
|
46
47
|
"assert-fn": "^1.0.0",
|
|
47
48
|
"async.util.noop": "^0.5.2",
|
|
48
49
|
"attempt-statement": "^1.1.0",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"blank-space": "^0.0.1",
|
|
51
52
|
"bluebird": "^3.7.2",
|
|
52
53
|
"brototype": "^0.0.6",
|
|
53
|
-
"
|
|
54
|
+
"chalk4096": "^1.0.0",
|
|
54
55
|
"chalkbox": "^1.0.0",
|
|
55
56
|
"cheerio": "^1.0.0",
|
|
56
57
|
"cli-color": "^2.0.4",
|
|
@@ -82,7 +83,6 @@
|
|
|
82
83
|
"garbage": "^0.0.0",
|
|
83
84
|
"genbaneko": "^2.1.3",
|
|
84
85
|
"general-concat": "^1.0.0",
|
|
85
|
-
"get-ecmascript-type-of": "^1.0.0",
|
|
86
86
|
"get-intrinsic": "^1.2.4",
|
|
87
87
|
"get-member": "^1337.69.420",
|
|
88
88
|
"greenlantern": "^2.0.1",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"hello-vga-function": "^0.0.2",
|
|
92
92
|
"if": "^2.0.0",
|
|
93
93
|
"immediate-error": "^6.3.0",
|
|
94
|
+
"important-extremely-useful-classes": "^3.0.0",
|
|
94
95
|
"infinities": "^1.0.0",
|
|
95
96
|
"infinoop": "^222.444.888",
|
|
96
97
|
"integer-value-positive-zero": "^1.0.1",
|
|
@@ -165,6 +166,7 @@
|
|
|
165
166
|
"jquery": "^3.7.1",
|
|
166
167
|
"jquery-basic-arithmetic-plugin": "^1.1.0",
|
|
167
168
|
"jsdom": "^25.0.1",
|
|
169
|
+
"kitty": "^2.0.4",
|
|
168
170
|
"left-pad": "^1.3.0",
|
|
169
171
|
"leftpad": "^0.0.1",
|
|
170
172
|
"literally": "^1.0.0",
|
|
@@ -174,10 +176,12 @@
|
|
|
174
176
|
"lodash.noop": "^3.0.1",
|
|
175
177
|
"logtoconsole": "^1.0.7",
|
|
176
178
|
"lolcatjs": "^2.4.3",
|
|
179
|
+
"lolite": "^1.1.15",
|
|
177
180
|
"lua-interpreter": "^0.0.3",
|
|
178
181
|
"luaparse": "^0.3.1",
|
|
179
182
|
"m.noop": "^2.0.0",
|
|
180
183
|
"meow.js": "^1.0.6",
|
|
184
|
+
"meta-noop": "^1.0.1",
|
|
181
185
|
"n0p3": "^1.0.2",
|
|
182
186
|
"negative-infinity": "^1.0.0",
|
|
183
187
|
"negative-zero": "^4.0.0",
|
|
@@ -214,6 +218,7 @@
|
|
|
214
218
|
"phone-number-generator-js": "^1.2.12",
|
|
215
219
|
"picocolors": "^1.0.1",
|
|
216
220
|
"positive-zero": "^4.0.0",
|
|
221
|
+
"purely": "^0.0.2",
|
|
217
222
|
"qc-core": "^0.0.0",
|
|
218
223
|
"random-angry-emoji": "^4.0.3",
|
|
219
224
|
"random-food-emoji": "^2.0.1",
|
|
@@ -228,6 +233,7 @@
|
|
|
228
233
|
"seventeen-integer": "^1.0.0",
|
|
229
234
|
"sixteen-constant": "^1.0.0",
|
|
230
235
|
"sixty-seven": "^1.0.0",
|
|
236
|
+
"space-string": "^1.0.0",
|
|
231
237
|
"striptags": "^3.2.0",
|
|
232
238
|
"successor": "^1.0.1",
|
|
233
239
|
"the-number-one": "^1.0.1",
|
|
@@ -254,6 +260,7 @@
|
|
|
254
260
|
"vapor-js-npm": "^1.4.6",
|
|
255
261
|
"voidfn": "^1.0.0",
|
|
256
262
|
"vretriever": "^1.0.0",
|
|
263
|
+
"vvalue": "^1.0.0",
|
|
257
264
|
"weird-instanceof": "^1.0.0",
|
|
258
265
|
"west-pad": "^2.0.1",
|
|
259
266
|
"whatev": "^1.0.0",
|
|
@@ -263,7 +270,7 @@
|
|
|
263
270
|
"zeropad": "^1.1.0",
|
|
264
271
|
"zerosurge": "^15.0.0"
|
|
265
272
|
},
|
|
266
|
-
"homepage": "https://
|
|
273
|
+
"homepage": "https://github.com/enterprise-npm-ai/FalseJS",
|
|
267
274
|
"repository": {
|
|
268
275
|
"type": "git",
|
|
269
276
|
"url": "git+https://github.com/10xEngineersQualityProgramming/FalseJS.git"
|