@falsejs/falsejs 4.1.7 → 4.1.9
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 +31 -25
- package/package.json +6 -2
package/index.js
CHANGED
|
@@ -19,12 +19,20 @@
|
|
|
19
19
|
try {
|
|
20
20
|
false.valueOf()
|
|
21
21
|
} catch {
|
|
22
|
-
global.false =
|
|
22
|
+
global.false = module.exports.constructor
|
|
23
|
+
.values(module.exports.constructor())
|
|
24
|
+
.includes() // tricky way to get false
|
|
23
25
|
}
|
|
24
26
|
try {
|
|
25
27
|
true.valueOf()
|
|
26
28
|
} catch {
|
|
27
|
-
global.true =
|
|
29
|
+
global.true = module.exports.constructor
|
|
30
|
+
.values(module.exports.constructor())
|
|
31
|
+
.constructor.name.includes(
|
|
32
|
+
module.exports.constructor.prototype.toString.call(
|
|
33
|
+
module.exports.constructor.values(module.exports.constructor()),
|
|
34
|
+
).split("[object ").pop().split("]")[NaN.constructor.prototype.valueOf()],
|
|
35
|
+
) // tricky way to get true
|
|
28
36
|
}
|
|
29
37
|
|
|
30
38
|
const isComputerOnFire = require("is-computer-on-fire").isComputerOnFire // require external is-computer-on-fire package.
|
|
@@ -57,6 +65,8 @@ if (isComputerOnFire()) {
|
|
|
57
65
|
require("user")() // something else that improves load times and performance
|
|
58
66
|
require("vapor-js-npm") // vapor also makes your program faster
|
|
59
67
|
|
|
68
|
+
// replaceAllOf
|
|
69
|
+
require("str-replaceallof-es").shim()
|
|
60
70
|
;(function (factory) {
|
|
61
71
|
module.exports.default = factory(jQuery) // run and export falsejs.
|
|
62
72
|
})(function ($) {
|
|
@@ -65,7 +75,7 @@ if (isComputerOnFire()) {
|
|
|
65
75
|
|
|
66
76
|
const jQuery = $ // alias for jquery
|
|
67
77
|
|
|
68
|
-
const variableHolder =
|
|
78
|
+
const variableHolder = require("lodash.stubobject")() // a variable holder
|
|
69
79
|
|
|
70
80
|
const GetIntrinsic = require("get-intrinsic") // cache our intrinsics
|
|
71
81
|
|
|
@@ -76,7 +86,7 @@ if (isComputerOnFire()) {
|
|
|
76
86
|
const _ = require("lodash") // every project needs lodash
|
|
77
87
|
const underscore = require("underscore") // underscore.js. the predecessor of lodash.
|
|
78
88
|
const k = require("kitty") // lodash but with some mixins in it
|
|
79
|
-
const
|
|
89
|
+
const lolite = require("lolite") // the 10x utility package
|
|
80
90
|
const React = require("react") // the hype framework everyone uses for some reason
|
|
81
91
|
const ReactDOMServer = require("react-dom/server") // part of react
|
|
82
92
|
const cheerio = require("cheerio") // cheerio!
|
|
@@ -283,7 +293,7 @@ if (isComputerOnFire()) {
|
|
|
283
293
|
const notStrictlyEqual = not(strictlyEqual)
|
|
284
294
|
var trueValue = require("true-value")() // get true with quantum fisics simulation
|
|
285
295
|
var tVal = trueValue // tVal sounds cool so i put it here too
|
|
286
|
-
var t = ()
|
|
296
|
+
var t = require("@substack/is-match")() // returns true.
|
|
287
297
|
const { mGenbaneko } = require("genbaneko") // i like cats
|
|
288
298
|
const leftPad = require("left-pad") //every project needs leftpad.
|
|
289
299
|
const rightPad = require("right-pad") //to the right, to the right.
|
|
@@ -347,9 +357,10 @@ if (isComputerOnFire()) {
|
|
|
347
357
|
|
|
348
358
|
// A useful function to get a DHTML string.
|
|
349
359
|
function getDHTMLString() {
|
|
350
|
-
return `netscape_layer_id_${
|
|
351
|
-
thirteenResolver()
|
|
352
|
-
|
|
360
|
+
return `netscape_layer_id_${lolite.multiply(
|
|
361
|
+
thirteenResolver(),
|
|
362
|
+
lolite.multiply(thirteenResolver(), thirteenResolver()),
|
|
363
|
+
)}`
|
|
353
364
|
}
|
|
354
365
|
|
|
355
366
|
const NumberFormatter = Intl.NumberFormat
|
|
@@ -373,12 +384,12 @@ if (isComputerOnFire()) {
|
|
|
373
384
|
+" "
|
|
374
385
|
)
|
|
375
386
|
//100 whitespaces
|
|
376
|
-
.
|
|
387
|
+
.replaceAllOf(" ", require("space-string"))
|
|
377
388
|
const STARTING_SUCCESSOR_HELPER_STACK = zr0()
|
|
378
|
-
const FALSE =
|
|
389
|
+
const FALSE = lolite.not(whatevTrueValue)
|
|
379
390
|
const _f = constant(FALSE)
|
|
380
391
|
const ERROR_THAT_WILL_NEVER_BE_SHOWN = variableHolder._lilmessage
|
|
381
|
-
const TEN_THOUSAND =
|
|
392
|
+
const TEN_THOUSAND = lolite.multiply(numberOneHundred, numberOneHundred)
|
|
382
393
|
const LEFT_PAD_INPUT = jQuery.multiply(
|
|
383
394
|
five(),
|
|
384
395
|
jQuery.add(five(), jQuery.divide(five(), five())),
|
|
@@ -447,12 +458,7 @@ if (isComputerOnFire()) {
|
|
|
447
458
|
}
|
|
448
459
|
}
|
|
449
460
|
|
|
450
|
-
const FalseJSValidationFailedToPassError =
|
|
451
|
-
constructor(...stuff) {
|
|
452
|
-
super(...stuff)
|
|
453
|
-
this.name = "FalseJSValidationFailedToPassError"
|
|
454
|
-
}
|
|
455
|
-
}
|
|
461
|
+
const FalseJSValidationFailedToPassError = require("@falsejs/validation-failed-to-pass-error")
|
|
456
462
|
|
|
457
463
|
const SuccessorHelper = class {
|
|
458
464
|
s(value) {
|
|
@@ -550,7 +556,7 @@ if (isComputerOnFire()) {
|
|
|
550
556
|
var total = zr0()
|
|
551
557
|
// let's use underscore instead of forEach
|
|
552
558
|
underscore.each(nums, (num) => {
|
|
553
|
-
total =
|
|
559
|
+
total = lolite.add(total, num)
|
|
554
560
|
})
|
|
555
561
|
return total
|
|
556
562
|
}
|
|
@@ -558,13 +564,15 @@ if (isComputerOnFire()) {
|
|
|
558
564
|
var total = zr0()
|
|
559
565
|
// this time we'll use lodash
|
|
560
566
|
_.each(nums, (num) => {
|
|
561
|
-
total =
|
|
567
|
+
total = lolite.subtract(total, num)
|
|
562
568
|
})
|
|
563
569
|
return total
|
|
564
570
|
}
|
|
565
571
|
$.equals = (v1, v2) => {
|
|
566
572
|
if (
|
|
567
|
-
not(() =>
|
|
573
|
+
not(() =>
|
|
574
|
+
lolite.and(isActualNumber(v1), logicalNot(isActualNumber(v2))),
|
|
575
|
+
)()
|
|
568
576
|
) {
|
|
569
577
|
immediateError(
|
|
570
578
|
concatenater(
|
|
@@ -599,7 +607,7 @@ if (isComputerOnFire()) {
|
|
|
599
607
|
}
|
|
600
608
|
}
|
|
601
609
|
|
|
602
|
-
const surpriseArray =
|
|
610
|
+
const surpriseArray = require("lodash.stubarray")() // define empty array
|
|
603
611
|
setLogFuntion(() => {
|
|
604
612
|
// create an ending random number for our users eventually
|
|
605
613
|
surpriseArray.push(
|
|
@@ -644,7 +652,7 @@ if (isComputerOnFire()) {
|
|
|
644
652
|
}
|
|
645
653
|
|
|
646
654
|
function predecessor(n) {
|
|
647
|
-
return
|
|
655
|
+
return lolite.add(n, lolite.invert(one))
|
|
648
656
|
}
|
|
649
657
|
|
|
650
658
|
function vValue(num) {
|
|
@@ -2551,9 +2559,7 @@ if (isComputerOnFire()) {
|
|
|
2551
2559
|
// Calculate a hash-like value using trigonometric functions
|
|
2552
2560
|
const trigValue =
|
|
2553
2561
|
parseFloat(
|
|
2554
|
-
parseFloat(
|
|
2555
|
-
add("0.", baseConverted),
|
|
2556
|
-
) *
|
|
2562
|
+
parseFloat(add("0.", baseConverted)) *
|
|
2557
2563
|
(five() + (five() / five() + five() / five())) *
|
|
2558
2564
|
five() +
|
|
2559
2565
|
five() / five(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@falsejs/falsejs",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.9",
|
|
4
4
|
"description": "Returns false.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@ahsm/noop": "^1.0.0",
|
|
20
20
|
"@colors/colors": "^1.6.0",
|
|
21
21
|
"@falsejs/is-true-helper": "^1.0.2",
|
|
22
|
+
"@falsejs/validation-failed-to-pass-error": "github:10xly/FalseJS-FalseJSValidationFailedToPassError",
|
|
22
23
|
"@identity-js/identity": "^1.2.13",
|
|
23
24
|
"@is-(unknown)/is-nil": "^1.2.0",
|
|
24
25
|
"@is-(unknown)/is-null": "^1.2.2",
|
|
@@ -175,9 +176,11 @@
|
|
|
175
176
|
"lodash._noop": "^2.2.1",
|
|
176
177
|
"lodash.constant": "^3.0.0",
|
|
177
178
|
"lodash.noop": "^3.0.1",
|
|
179
|
+
"lodash.stubarray": "^4.13.0",
|
|
180
|
+
"lodash.stubobject": "^4.13.0",
|
|
178
181
|
"logtoconsole": "^1.0.7",
|
|
179
182
|
"lolcatjs": "^2.4.3",
|
|
180
|
-
"lolite": "^1.1.
|
|
183
|
+
"lolite": "^1.1.24",
|
|
181
184
|
"lua-interpreter": "^0.0.3",
|
|
182
185
|
"luaparse": "^0.3.1",
|
|
183
186
|
"meow.js": "^1.0.6",
|
|
@@ -233,6 +236,7 @@
|
|
|
233
236
|
"sixteen-constant": "^1.0.0",
|
|
234
237
|
"sixty-seven": "^1.0.0",
|
|
235
238
|
"space-string": "^1.0.0",
|
|
239
|
+
"str-replaceallof-es": "^1.0.0",
|
|
236
240
|
"striptags": "^3.2.0",
|
|
237
241
|
"successor": "^1.0.1",
|
|
238
242
|
"the-number-one": "^1.0.1",
|