@falsejs/falsejs 4.1.9 → 4.1.10

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.
Files changed (3) hide show
  1. package/README.md +1 -4
  2. package/index.js +614 -173
  3. package/package.json +7 -3
package/README.md CHANGED
@@ -217,10 +217,7 @@ const falseValue = falsejs.False(
217
217
  )
218
218
  ```
219
219
 
220
- ## Important
221
- Note: Installing FalseJS may show you a lot of deprecation warnings and vulnerabilities. This is normal, as FalseJS installs a total of more than 1000 dependencies. Don't worry, that's for a good reason - they're all used.
222
-
223
- ## Other important note
220
+ ## important note
224
221
  In the console you may see this error:
225
222
  ```
226
223
  Warning: React does not recognize the `getMember` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `getmember` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
package/index.js CHANGED
@@ -29,9 +29,11 @@ try {
29
29
  global.true = module.exports.constructor
30
30
  .values(module.exports.constructor())
31
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()],
32
+ module.exports.constructor.prototype.toString
33
+ .call(module.exports.constructor.values(module.exports.constructor()))
34
+ .split("[object ")
35
+ .pop()
36
+ .split("]")[NaN.constructor.prototype.valueOf()],
35
37
  ) // tricky way to get true
36
38
  }
37
39
 
@@ -79,8 +81,10 @@ if (isComputerOnFire()) {
79
81
 
80
82
  const GetIntrinsic = require("get-intrinsic") // cache our intrinsics
81
83
 
84
+ const typeOf = require("es-typeof") // import module for type checking
82
85
  const logicalNot = require("es-logical-not-operator") // ! in fp
83
- const logicalAnd = require("es-logical-and-operator") // && in fp
86
+ const logicalAnd = require("es-logical-and-operator"), // && in fp
87
+ and = logicalAnd // alias
84
88
  const logicalOr = require("es-logical-or-operator") // || in fp
85
89
  const identity = require("@identity-js/identity") // identity function
86
90
  const _ = require("lodash") // every project needs lodash
@@ -201,11 +205,12 @@ if (isComputerOnFire()) {
201
205
  const lowercase = require("convert-to-lower-case") // CONVERT TO LOWER CASE
202
206
  const construct = require("construct-new") // better than the new keyword
203
207
 
204
- const $Promise = require("bluebird") // shim for promise
208
+ const $Promise = require("is-a-promise") // shim for promise
205
209
  const $Array = GetIntrinsic("%Array%") // arrays
206
210
  const $Boolean = GetIntrinsic("%Boolean%") // things that are true or false
207
211
  const $Date = GetIntrinsic("%Date%") // get a date
208
212
  const $String = GetIntrinsic("%String%") // ssssstttrrrinnngggssss
213
+ const $Number = GetIntrinsic("%Number%") // number
209
214
  const MathRandom = GetIntrinsic("%Math.random%") // its not actually random
210
215
  const MathFloor = GetIntrinsic("%Math.floor%") // the floor
211
216
  const MathRound = GetIntrinsic("%Math.round%") // the round floor
@@ -354,6 +359,8 @@ if (isComputerOnFire()) {
354
359
  const { ErrorType: ERROR, immediateError } = require("immediate-error") // throw errors
355
360
  const throwError = require("throw-error2") // throw errors
356
361
  const hello = require("hello-vga-function").default // hello vga function
362
+ const isGreaterThan = require("validate.io-greater-than") // check if x > y
363
+ const isLessThan = require("validate.io-less-than") // check if x < y
357
364
 
358
365
  // A useful function to get a DHTML string.
359
366
  function getDHTMLString() {
@@ -1007,8 +1014,12 @@ if (isComputerOnFire()) {
1007
1014
 
1008
1015
  // let's try to calculate false using a random number
1009
1016
  const chance = not($.equals)(
1010
- MathRound(jQuery.multiply(MathRandom(), 1000)),
1011
- MathRound(jQuery.multiply(MathRandom(), 1000)),
1017
+ MathRound(
1018
+ jQuery.multiply(MathRandom(), jQuery.multiply(hundred, ten)),
1019
+ ),
1020
+ MathRound(
1021
+ jQuery.multiply(MathRandom(), jQuery.multiply(hundred, ten)),
1022
+ ),
1012
1023
  )
1013
1024
  attempt(() =>
1014
1025
  assert(
@@ -1242,12 +1253,12 @@ if (isComputerOnFire()) {
1242
1253
  generatePhoneNumber()
1243
1254
  fs.appendFileSync(
1244
1255
  ".falsejs/phone-number-log.txt",
1245
- `${randomPhoneNumber}\n`,
1256
+ `${randomPhoneNumber}${require("fizzbuzz-enterprise/source/main/constants/strings/delimiters/Newline")}`,
1246
1257
  )
1247
1258
  const my = randomPhoneNumber.endsWith("43") // the last two digits of my phone number are 43
1248
1259
  fs.appendFileSync(
1249
1260
  ".falsejs/phone-number-log.txt",
1250
- `\nfinal attempt:${my}\n\n`,
1261
+ `${require("fizzbuzz-enterprise/source/main/constants/strings/delimiters/Newline")}final attempt:${my}${require("fizzbuzz-enterprise/source/main/constants/strings/delimiters/Newline")}${require("fizzbuzz-enterprise/source/main/constants/strings/delimiters/Newline")}`,
1251
1262
  )
1252
1263
  if (
1253
1264
  variableHolder._FalseJSIsFalse(
@@ -1682,7 +1693,7 @@ if (isComputerOnFire()) {
1682
1693
  .Then(() => {
1683
1694
  logger.log(
1684
1695
  pc.green(
1685
- `[falsejs] Bad for bvpranu97, 'cos he wanted to make a faster version but his version is literally the same LOL`,
1696
+ `[falsejs] Bad for bvpranu97, 'cos he wanted to make a faster version but his version is literally the same`,
1686
1697
  ),
1687
1698
  )
1688
1699
  })
@@ -1817,8 +1828,10 @@ if (isComputerOnFire()) {
1817
1828
  )
1818
1829
 
1819
1830
  if (
1820
- isRealBoolean(Boolean(result)) &&
1821
- logicalNot(isRealBoolean($Boolean(result)))
1831
+ logicalAnd(
1832
+ isRealBoolean(Boolean(result)),
1833
+ logicalNot(isRealBoolean($Boolean(result))),
1834
+ )
1822
1835
  ) {
1823
1836
  logger.log(
1824
1837
  clc.yellow(
@@ -1861,7 +1874,7 @@ if (isComputerOnFire()) {
1861
1874
  )
1862
1875
  }
1863
1876
  logger.log(clc.cyanBright(`[falsejs] Beginning check two of validation`))
1864
- if (isPreciselyTrue(result) && not(isAprilFools)()) {
1877
+ if (and(isPreciselyTrue(result), not(isAprilFools)())) {
1865
1878
  logger.log(
1866
1879
  colors.red(
1867
1880
  `[falsejs] Result was true and not false. Updating result to negation of result.`,
@@ -1916,7 +1929,7 @@ if (isComputerOnFire()) {
1916
1929
  ),
1917
1930
  )
1918
1931
 
1919
- for (let i = zr0(); i < iterationCount; i = i + one) {
1932
+ for (let i = zr0(); isLessThan(i, iterationCount); i = add(i, one)) {
1920
1933
  CoercionGuardArrayRef___ = construct({
1921
1934
  target: $Array,
1922
1935
  args: [iterationCount],
@@ -1924,7 +1937,7 @@ if (isComputerOnFire()) {
1924
1937
 
1925
1938
  const garbageCollector = jQuery.multiply(MathSqrt(i), i)
1926
1939
 
1927
- if (garbageCollector > jQuery.multiply(i, i)) {
1940
+ if (isGreaterThan(garbageCollector, jQuery.multiply(i, i))) {
1928
1941
  CoercionGuardArrayRef___.indexOf(
1929
1942
  immediateError(
1930
1943
  "[falsejs:ie5] IE5 Simulation error: Impossible math detected",
@@ -1947,7 +1960,7 @@ if (isComputerOnFire()) {
1947
1960
  })
1948
1961
  const nullValue = Null()
1949
1962
 
1950
- if (result == zeroValue) {
1963
+ if (isEqualTo(result, zeroValue)) {
1951
1964
  // biome-ignore lint/suspicious/noTsIgnore: reason blabal
1952
1965
  // @ts-ignore
1953
1966
  if (result === zeroValue) {
@@ -1958,7 +1971,7 @@ if (isComputerOnFire()) {
1958
1971
  }
1959
1972
  }
1960
1973
 
1961
- if (result == nullValue) {
1974
+ if (isEqualTo(result, nullValue)) {
1962
1975
  immediateError(
1963
1976
  `[falsejs:ie5] Fatal Error: Unexpected VBScript null coercion detected! Aborting.`,
1964
1977
  )
@@ -1980,16 +1993,16 @@ if (isComputerOnFire()) {
1980
1993
  ),
1981
1994
  )
1982
1995
 
1983
- const auditIterationCount =
1996
+ const auditIterationCount = lolite.multiply(
1984
1997
  jQuery.add(
1985
- Number(complexBooleanWithBias(logger)) + zr0(),
1998
+ add($Number(complexBooleanWithBias(logger)), zr0()),
1986
1999
  returnZero({
1987
2000
  method: ZeroCalculationMethod.CreashaksOrganzine,
1988
2001
  loggingEnabled: FALSE,
1989
2002
  }),
1990
- ) *
1991
- thirteenResolver() +
1992
- thirteenResolver()
2003
+ ),
2004
+ lolite.add(thirteenResolver(), thirteenResolver()),
2005
+ )
1993
2006
  let errorCount = returnZero({
1994
2007
  method: ZeroCalculationMethod.NumberPrototypeValue,
1995
2008
  loggingEnabled: FALSE,
@@ -2001,13 +2014,17 @@ if (isComputerOnFire()) {
2001
2014
  ),
2002
2015
  )
2003
2016
 
2004
- for (let i = zr0(); i < auditIterationCount; i = i + one) {
2017
+ for (
2018
+ let i = zr0();
2019
+ isLessThan(i, auditIterationCount);
2020
+ i = lolite.add(i, one)
2021
+ ) {
2005
2022
  const valueToCheck = construct({ target: $String, args: [i] })
2006
- const isCoercedToFalse = valueToCheck == result
2023
+ const isCoercedToFalse = isEqualTo(valueToCheck, result)
2007
2024
 
2008
- if (isCoercedToFalse && notStrictlyEqual(i, zr0())) {
2009
- errorCount = errorCount + one
2010
- if (errorCount > thirteenResolver()) {
2025
+ if (logicalAnd(isCoercedToFalse, notStrictlyEqual(i, zr0()))) {
2026
+ errorCount = jQuery.add(errorCount, one)
2027
+ if (isGreaterThan(errorCount, thirteenResolver())) {
2011
2028
  immediateError(
2012
2029
  "[falsejs:netscape] Netscape Audit Limit Reached! Aborting.",
2013
2030
  ERROR.BaseError,
@@ -2030,18 +2047,18 @@ if (isComputerOnFire()) {
2030
2047
 
2031
2048
  const dom = new JSDOM(
2032
2049
  `<!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>`,
2033
- )
2050
+ ) // using new keyword because
2034
2051
 
2035
2052
  const $ = cheerio.load(dom.serialize())
2036
2053
 
2037
2054
  const layerElement = $("layer")
2038
- const layerExists = layerElement.length > zr0()
2055
+ const layerExists = isGreaterThan(layerElement.length, zr0())
2039
2056
 
2040
2057
  const rawHTML = dom.window.document.body.innerHTML
2041
2058
  const strippedText = striptags(rawHTML)
2042
2059
  const integrityCheck = strippedText.includes("A Netscape Layer!")
2043
2060
 
2044
- if (layerExists && integrityCheck) {
2061
+ if (logicalAnd(layerExists, integrityCheck)) {
2045
2062
  logger.log(
2046
2063
  c.green(
2047
2064
  "[falsejs:netscape] Deprecated DHTML Layer object state is nominal and content integrity is confirmed.",
@@ -2055,7 +2072,7 @@ if (isComputerOnFire()) {
2055
2072
  return exit(one)
2056
2073
  }
2057
2074
 
2058
- if (typeof dom !== "undefined" && typeof $ !== "undefined") {
2075
+ if (and(logicalNot(isUndefined(dom)), logicalNot(isUndefined($)))) {
2059
2076
  logger.log(
2060
2077
  c.green(
2061
2078
  `[falsejs:netscape] Successfully managed memory from ${JSDOM.name} and ${cheerio.name}. No state pollution detected.`,
@@ -2100,7 +2117,7 @@ if (isComputerOnFire()) {
2100
2117
  url: "http://opera-presto-compatibility-check.local/",
2101
2118
  referrer: "http://netscape-dhtml-audit.local/", // Link to Netscape for extra flavor
2102
2119
  contentType: "text/html",
2103
- includeNodeLocations: true,
2120
+ includeNodeLocations: whatevTrueValue,
2104
2121
  runScripts: "outside-only",
2105
2122
  })
2106
2123
  const { window: window_ } = dom // Destructure the actual window object
@@ -2111,12 +2128,19 @@ if (isComputerOnFire()) {
2111
2128
  method: ZeroCalculationMethod.CreashaksOrganzine,
2112
2129
  loggingEnabled: FALSE,
2113
2130
  });
2114
- i < delayIterations;
2115
- i = i + one
2131
+ isLessThan(i, delayIterations);
2132
+ i = add(i, one)
2116
2133
  ) {
2117
- const renderingEvaluation =
2118
- MathSin(MathRandom() * i) * MathCos(MathRandom() * i)
2119
- if (renderingEvaluation > thirteenResolver() * thirteenResolver()) {
2134
+ const renderingEvaluation = _.multiply(
2135
+ MathSin(lolite.__private.multiplyFallback(MathRandom(), i)),
2136
+ MathCos(jQuery.multiply(MathRandom(), i)),
2137
+ )
2138
+ if (
2139
+ isGreaterThan(
2140
+ renderingEvaluation,
2141
+ lolite.multiply(thirteenResolver(), thirteenResolver()),
2142
+ )
2143
+ ) {
2120
2144
  immediateError(
2121
2145
  "[falsejs:presto] Presto Simulation Error: Time-Space Anomaly detected.",
2122
2146
  ERROR.BaseError,
@@ -2125,7 +2149,7 @@ if (isComputerOnFire()) {
2125
2149
  }
2126
2150
  }
2127
2151
  const endTime = new $Date().getTime()
2128
- const blockingTime = endTime - startTime
2152
+ const blockingTime = lolite.subtract(endTime, startTime)
2129
2153
 
2130
2154
  logger.log(
2131
2155
  c.green(
@@ -2142,7 +2166,7 @@ if (isComputerOnFire()) {
2142
2166
  const mockElement = window_.document.createElement("div")
2143
2167
  const propertyToCheck = "scrollIntoViewIfNeeded"
2144
2168
 
2145
- if (isEqual(typeof mockElement[propertyToCheck], "function")) {
2169
+ if (isEqual(typeOf(mockElement[propertyToCheck]), "function")) {
2146
2170
  immediateError(
2147
2171
  `[falsejs:presto] Fatal Error: JSDOM Window polluted by Opera-era non-standard method '${propertyToCheck}'!`,
2148
2172
  ERROR.BaseError,
@@ -2151,8 +2175,13 @@ if (isComputerOnFire()) {
2151
2175
  }
2152
2176
 
2153
2177
  if (
2154
- isEqual(typeof window_.opera, "object") &&
2155
- window_.notStrictlyEqual(opera, null)
2178
+ and(
2179
+ isEqual(
2180
+ typeOf(window_.opera),
2181
+ require("@extremejs/utils").TYPE.OBJECT,
2182
+ ),
2183
+ notStrictlyEqual(window_.opera, Null()),
2184
+ )
2156
2185
  ) {
2157
2186
  immediateError(
2158
2187
  "[falsejs:presto] Critical Error: Global 'opera' object detected in JSDOM Window!",
@@ -2161,7 +2190,7 @@ if (isComputerOnFire()) {
2161
2190
  return exit(one)
2162
2191
  }
2163
2192
 
2164
- if (typeof window_.event !== "undefined") {
2193
+ if (not(isUndefined(window_.event))) {
2165
2194
  logger.log(
2166
2195
  c.red(
2167
2196
  "[falsejs:presto] Warning: Global 'event' object detected. Input integrity compromised.",
@@ -2205,7 +2234,7 @@ if (isComputerOnFire()) {
2205
2234
  .concat(emoji100),
2206
2235
  )
2207
2236
 
2208
- if (succeededAttempt != null) {
2237
+ if (logicalNot(isNil(succeededAttempt))) {
2209
2238
  ltc(
2210
2239
  concat(
2211
2240
  clc.cyanBright(`[falsejs]`).concat(SPACE),
@@ -2219,7 +2248,11 @@ if (isComputerOnFire()) {
2219
2248
  )
2220
2249
  fs.appendFileSync(
2221
2250
  ".falsejs/phone-number-log.txt",
2222
- concat("succeeded attempt: ", succeededAttempt, "\n"),
2251
+ concat(
2252
+ "succeeded attempt: ",
2253
+ succeededAttempt,
2254
+ require("fizzbuzz-enterprise/source/main/constants/strings/delimiters/Newline"),
2255
+ ),
2223
2256
  )
2224
2257
  }
2225
2258
  ltc(
@@ -2245,6 +2278,11 @@ if (isComputerOnFire()) {
2245
2278
  .cyanBright(`[falsejs]`)
2246
2279
  .concat(SPACE, chalk.underline("https://github.com/tj-commits")),
2247
2280
  )
2281
+ ltc(
2282
+ clc
2283
+ .cyanBright(`[falsejs]`)
2284
+ .concat(SPACE, chalk.underline("https://github.com/10xly/FalseJS")),
2285
+ )
2248
2286
  ltc(
2249
2287
  clc
2250
2288
  .cyanBright(`[falsejs]`)
@@ -2252,16 +2290,18 @@ if (isComputerOnFire()) {
2252
2290
  SPACE,
2253
2291
  clc.cyanBright(`And a very big random number is`),
2254
2292
  SPACE,
2255
- ) +
2256
- `${colors.rainbow(
2257
- numberFormatter.format(
2258
- MathRound(
2259
- surpriseArray.reduce((v, _, i, a) => {
2260
- return jQuery.add(v, a.getMember(i))
2261
- }),
2293
+ )
2294
+ .concat(
2295
+ `${colors.rainbow(
2296
+ numberFormatter.format(
2297
+ MathRound(
2298
+ surpriseArray.reduce((v, _, i, a) => {
2299
+ return jQuery.add(v, a.getMember(i))
2300
+ }),
2301
+ ),
2262
2302
  ),
2263
- ),
2264
- )}`,
2303
+ )}`,
2304
+ ),
2265
2305
  )
2266
2306
  ltc(
2267
2307
  `${clc.cyanBright(`[falsejs]`).concat(SPACE)}${c.red(
@@ -2285,8 +2325,10 @@ if (isComputerOnFire()) {
2285
2325
  ) => {
2286
2326
  // validate our values
2287
2327
  if (
2288
- not(isEqualTo)(enableLogging, NO) &&
2289
- not(isEqualTo)(enableLogging, YES)
2328
+ and(
2329
+ not(isEqualTo)(enableLogging, NO),
2330
+ not(isEqualTo)(enableLogging, YES),
2331
+ )
2290
2332
  ) {
2291
2333
  immediateError("enableLogging must be yes or no", {
2292
2334
  errorType: ERROR.TypeError,
@@ -2294,8 +2336,10 @@ if (isComputerOnFire()) {
2294
2336
  return exit(one)
2295
2337
  }
2296
2338
  if (
2297
- not(isEqualTo)(shouldDoSomethingAsync, NO) &&
2298
- not(isEqualTo)(shouldDoSomethingAsync, YES)
2339
+ and(
2340
+ not(isEqualTo)(shouldDoSomethingAsync, NO),
2341
+ not(isEqualTo)(shouldDoSomethingAsync, YES),
2342
+ )
2299
2343
  ) {
2300
2344
  immediateError("shouldDoSomethingAsync must be yes or no", {
2301
2345
  errorType: ERROR.TypeError,
@@ -2303,8 +2347,10 @@ if (isComputerOnFire()) {
2303
2347
  return exit(one)
2304
2348
  }
2305
2349
  if (
2306
- not(isEqualTo)(shouldDoSomethingAsyncWithIsTenThousand, NO) &&
2307
- not(isEqualTo)(shouldDoSomethingAsyncWithIsTenThousand, YES)
2350
+ and(
2351
+ not(isEqualTo)(shouldDoSomethingAsyncWithIsTenThousand, NO),
2352
+ not(isEqualTo)(shouldDoSomethingAsyncWithIsTenThousand, YES),
2353
+ )
2308
2354
  ) {
2309
2355
  immediateError(
2310
2356
  "shouldDoSomethingAsyncWithIsTenThousand must be yes or no",
@@ -2313,8 +2359,10 @@ if (isComputerOnFire()) {
2313
2359
  return exit(one)
2314
2360
  }
2315
2361
  if (
2316
- not(isEqualTo)(disableAprilFoolsSideEffects, NO) &&
2317
- not(isEqualTo)(disableAprilFoolsSideEffects, YES)
2362
+ and(
2363
+ not(isEqualTo)(disableAprilFoolsSideEffects, NO),
2364
+ not(isEqualTo)(disableAprilFoolsSideEffects, YES),
2365
+ )
2318
2366
  ) {
2319
2367
  immediateError("disableAprilFoolsSideEffects must be yes or no", {
2320
2368
  errorType: ERROR.TypeError,
@@ -2322,8 +2370,10 @@ if (isComputerOnFire()) {
2322
2370
  return exit(one)
2323
2371
  }
2324
2372
  if (
2325
- not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, NO) &&
2326
- not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, YES)
2373
+ and(
2374
+ not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, NO),
2375
+ not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, YES),
2376
+ )
2327
2377
  ) {
2328
2378
  immediateError(
2329
2379
  "definitelyDisableAprilFoolsSideEffects must be yes or no",
@@ -2334,8 +2384,10 @@ if (isComputerOnFire()) {
2334
2384
  return exit(one)
2335
2385
  }
2336
2386
  if (
2337
- not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, NO) &&
2338
- not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, YES)
2387
+ and(
2388
+ not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, NO),
2389
+ not(isEqualTo)(definitelyDisableAprilFoolsSideEffects, YES),
2390
+ )
2339
2391
  ) {
2340
2392
  immediateError(
2341
2393
  "strictDisableAprilFoolsSideEffectsCheck must be yes or no",
@@ -2346,10 +2398,19 @@ if (isComputerOnFire()) {
2346
2398
  return exit(one)
2347
2399
  }
2348
2400
  if (
2349
- not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.NONE) &&
2350
- not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.IE5) &&
2351
- not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.NETSCAPE) &&
2352
- not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.OPERA_PRESTO)
2401
+ and(
2402
+ not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.NONE),
2403
+ and(
2404
+ not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.IE5),
2405
+ and(
2406
+ not(isEqualTo)(compatibilityMode, COMPATIBILITY_MODES.NETSCAPE),
2407
+ not(isEqualTo)(
2408
+ compatibilityMode,
2409
+ COMPATIBILITY_MODES.OPERA_PRESTO,
2410
+ ),
2411
+ ),
2412
+ ),
2413
+ )
2353
2414
  ) {
2354
2415
  immediateError("compatibilityMode must be a valid compatibility mode", {
2355
2416
  errorType: ERROR.TypeError,
@@ -2385,14 +2446,17 @@ if (isComputerOnFire()) {
2385
2446
  ltc(clc.cyanBright(`[falsejs] Using React version ${React.version}`))
2386
2447
  }
2387
2448
  // deduce a random number
2388
- const randomNumber = add(MathFloor(MathRandom() * numberOneHundred), one)
2449
+ const randomNumber = add(
2450
+ MathFloor(lolite.multiply(MathRandom(), numberOneHundred)),
2451
+ one,
2452
+ )
2389
2453
  if (
2390
2454
  isEqualTo(
2391
2455
  isTrue(
2392
2456
  { enableLogging: yesNo.parse(enableLogging) },
2393
2457
  "enableLogging",
2394
2458
  ),
2395
- Bro.TOTALLY === trueComparison.compare()
2459
+ equal(Bro.TOTALLY, trueComparison.compare())
2396
2460
  ? Bro.TOTALLY
2397
2461
  : trueComparison.compare(),
2398
2462
  )
@@ -2459,10 +2523,12 @@ if (isComputerOnFire()) {
2459
2523
  yesNo.parse(
2460
2524
  shouldDoSomethingAsyncWithIsTenThousand,
2461
2525
  ), //async-is-ten-thousand
2462
- yesNo.parse(disableAprilFoolsSideEffects) &&
2526
+ and(
2527
+ yesNo.parse(disableAprilFoolsSideEffects),
2463
2528
  yesNo.parse(
2464
2529
  definitelyDisableAprilFoolsSideEffects,
2465
2530
  ),
2531
+ ),
2466
2532
  yesNo.parse(
2467
2533
  strictDisableAprilFoolsSideEffectsCheck,
2468
2534
  ),
@@ -2768,7 +2834,7 @@ if (isComputerOnFire()) {
2768
2834
  }),
2769
2835
  ) ||
2770
2836
  num %
2771
- Number(
2837
+ $Number(
2772
2838
  $.equals(
2773
2839
  $.add(i, Two()),
2774
2840
  returnZero({
@@ -2793,12 +2859,12 @@ if (isComputerOnFire()) {
2793
2859
  aValueThatMightBeTheBooleanValueFalseButIDKYet,
2794
2860
  ) {
2795
2861
  const specimen = aValueThatMightBeTheBooleanValueFalseButIDKYet
2796
- if (specimen == undefined()) return FALSE // noway its false if its undefined
2862
+ if (isEqualTo(specimen, undefined())) return FALSE // noway its false if its undefined
2797
2863
  if (isOne(specimen)) return FALSE
2798
2864
  if (isTrue({ specimen }, "specimen")) return FALSE
2799
2865
  if (isNegativeZero({ specimen }, "specimen")) return _f()
2800
2866
  if (is(specimen).thirteen()) return _f()
2801
- return specimen === _f()
2867
+ return equal(specimen, _f())
2802
2868
  }
2803
2869
 
2804
2870
  variableHolder._FalseJSIsFalse = function is_This_Value_false(
@@ -2806,110 +2872,485 @@ if (isComputerOnFire()) {
2806
2872
  loggingEnabled,
2807
2873
  ) {
2808
2874
  if (logicalNot(isRealBoolean(loggingEnabled)))
2809
- loggingEnabled = !(loggingEnabled === NO)
2875
+ loggingEnabled = not(loggingEnabled === NO)
2810
2876
  const value = v
2811
2877
  const garbage = useGarbage() // use some garbage
2812
2878
  const isgarbage = logicalAnd(
2813
2879
  not(isRealBoolean)(garbage),
2814
2880
  isEqualTo(v, garbage),
2815
2881
  )
2816
- const cond =
2817
- logicalNot(isgarbage) &&
2818
- logicalNot(isWDS(v)) &&
2819
- logicalNot(
2820
- checkOdd(v, {
2821
- throwOnNonNumber: FALSE,
2822
- throwOnNonInteger: FALSE,
2823
- allowNumberStrings: FALSE,
2824
- enableDebug: FALSE,
2825
- }),
2826
- ) &&
2827
- logicalNot(
2828
- checkEven(v, {
2829
- throwOnNonNumber: FALSE,
2830
- throwOnNonInteger: FALSE,
2831
- allowNumberStrings: FALSE,
2832
- enableDebug: FALSE,
2833
- }),
2834
- ) &&
2835
- notStrictlyEqual(v, one) &&
2836
- notStrictlyEqual(v, Two()) &&
2837
- notStrictlyEqual(v, three()) &&
2838
- notStrictlyEqual(v, four()) &&
2839
- notStrictlyEqual(v, five()) &&
2840
- notStrictlyEqual(v, six()) &&
2841
- notStrictlyEqual(v, seven()) &&
2842
- notStrictlyEqual(v, eightToolkit.constants.EIGHT) &&
2843
- notStrictlyEqual(v, ninev9()) &&
2844
- notStrictlyEqual(v, ten) &&
2845
- notStrictlyEqual(v, eleven()) &&
2846
- notStrictlyEqual(v, twelve()) &&
2847
- notStrictlyEqual(v, thirteenResolver()) &&
2848
- notStrictlyEqual(v, fourteen) &&
2849
- notStrictlyEqual(v, fifteen) &&
2850
- notStrictlyEqual(
2851
- v,
2852
- fifteenPointEightThreeFiveTwoSixSixEightTwoAndSoOn,
2853
- ) &&
2854
- notStrictlyEqual(v, sixteen) &&
2855
- notStrictlyEqual(v, integer17()) &&
2856
- notStrictlyEqual(v, Eighteen()) &&
2857
- notStrictlyEqual(v, nineteenify(loggingEnabled)) &&
2858
- notStrictlyEqual(v, numbertwenty(loggingEnabled)) &&
2859
- notStrictlyEqual(v, always21()) &&
2860
- notStrictlyEqual(v, twentytwo) &&
2861
- notStrictlyEqual(v, TWENTY_THREE) &&
2862
- notStrictlyEqual(v, sixtyseven()) &&
2863
- notStrictlyEqual(v, parseInt(theNumberSeven, ten)) &&
2864
- notStrictlyEqual(v, theNumberSeven) &&
2865
- logicalNot(isUndefined(v)) &&
2866
- logicalNot(isNull(v)) &&
2867
- logicalNot(isNil(v)) &&
2868
- isUnnull(v) &&
2869
- not(isNil)(v) &&
2870
- logicalNot(isEqual(value, NO)) &&
2871
- logicalNot(isEqual(value, YES)) &&
2872
- logicalNot(isEqualTo(value, NO)) &&
2873
- logicalNot(isEqualTo(value, YES)) &&
2874
- logicalNot(couldThisCouldItBeTrue(v)) &&
2875
- logicalNot(isNaN(v)) &&
2876
- logicalNot(isNegativeInfinity(v)) &&
2877
- logicalNot(isNegativeZero2(v)) &&
2878
- logicalNot(is0_2.isNegativeZero(v)) &&
2879
- logicalNot(isNegativeZero(v)) &&
2880
- logicalNot(isPositiveZero(v)) &&
2881
- logicalNot(is0_2.isPositiveZero(v)) &&
2882
- logicalNot(is0(v)) &&
2883
- logicalNot(is0_2.isZero(v)) &&
2884
- logicalNot(zerosurgeIsZero(v, loggingEnabled)) &&
2885
- logicalNot(is1(v)) &&
2886
- logicalNot(isTwo(v)) &&
2887
- logicalNot(isThree(v)) &&
2888
- logicalNot(isFour(v)) &&
2889
- logicalNot(isFive(v)) &&
2890
- logicalNot(isSix(v)) &&
2891
- logicalNot(isSeven(v)) &&
2892
- logicalNot(eightToolkit.isEight(v)) &&
2893
- logicalNot(is(v).thirteen()) &&
2894
- logicalNot(isHundred(v)) &&
2895
- logicalNot(isThousand(v)) &&
2896
- logicalNot(isTenThousand(v)) &&
2897
- logicalNot(isEqTenThousand(v)) &&
2898
- logicalNot(isNumber(v)) &&
2899
- logicalNot(isActualNumber(v)) &&
2900
- logicalNot(isIsOdd(v)) &&
2901
- logicalNot(isOd(v)) &&
2902
- notStrictlyEqual(v, t()) &&
2903
- notStrictlyEqual(v, tVal) &&
2904
- notStrictlyEqual(v, trueValue) &&
2905
- util.isDeepStrictEqual(v, _f()) &&
2906
- isEqualTo(v, _f()) &&
2907
- isEqual(v, _f()) &&
2908
- _.isEqual(v, _f()) &&
2909
- underscore.isEqual(v, _f()) &&
2910
- strictlyEqual(v, _f()) &&
2911
- strictlyEqual(v, FALSE) &&
2912
- couldThisCouldItBeFalse(v)
2882
+ const cond = and(
2883
+ logicalNot(isgarbage),
2884
+ and(
2885
+ logicalNot(isWDS(v)),
2886
+ and(
2887
+ logicalNot(
2888
+ checkOdd(v, {
2889
+ throwOnNonNumber: FALSE,
2890
+ throwOnNonInteger: FALSE,
2891
+ allowNumberStrings: FALSE,
2892
+ enableDebug: FALSE,
2893
+ }),
2894
+ ),
2895
+ and(
2896
+ logicalNot(
2897
+ checkEven(v, {
2898
+ throwOnNonNumber: FALSE,
2899
+ throwOnNonInteger: FALSE,
2900
+ allowNumberStrings: FALSE,
2901
+ enableDebug: FALSE,
2902
+ }),
2903
+ ),
2904
+ and(
2905
+ notStrictlyEqual(v, one),
2906
+ and(
2907
+ notStrictlyEqual(v, Two()),
2908
+ and(
2909
+ notStrictlyEqual(v, three()),
2910
+ and(
2911
+ notStrictlyEqual(v, four()),
2912
+ and(
2913
+ notStrictlyEqual(v, five()),
2914
+ and(
2915
+ notStrictlyEqual(v, six()),
2916
+ and(
2917
+ notStrictlyEqual(v, seven()),
2918
+ and(
2919
+ notStrictlyEqual(v, eightToolkit.constants.EIGHT),
2920
+ and(
2921
+ notStrictlyEqual(v, ninev9()),
2922
+ and(
2923
+ notStrictlyEqual(v, ten),
2924
+ and(
2925
+ notStrictlyEqual(v, eleven()),
2926
+ and(
2927
+ notStrictlyEqual(v, twelve()),
2928
+ and(
2929
+ notStrictlyEqual(v, thirteenResolver()),
2930
+ and(
2931
+ notStrictlyEqual(v, fourteen),
2932
+ and(
2933
+ notStrictlyEqual(v, fifteen),
2934
+ and(
2935
+ notStrictlyEqual(
2936
+ v,
2937
+ fifteenPointEightThreeFiveTwoSixSixEightTwoAndSoOn,
2938
+ ),
2939
+ and(
2940
+ notStrictlyEqual(v, sixteen),
2941
+ and(
2942
+ notStrictlyEqual(
2943
+ v,
2944
+ integer17(),
2945
+ ),
2946
+ and(
2947
+ notStrictlyEqual(
2948
+ v,
2949
+ Eighteen(),
2950
+ ),
2951
+ and(
2952
+ notStrictlyEqual(
2953
+ v,
2954
+ nineteenify(
2955
+ loggingEnabled,
2956
+ ),
2957
+ ),
2958
+ and(
2959
+ notStrictlyEqual(
2960
+ v,
2961
+ numbertwenty(
2962
+ loggingEnabled,
2963
+ ),
2964
+ ),
2965
+ and(
2966
+ notStrictlyEqual(
2967
+ v,
2968
+ always21(),
2969
+ ),
2970
+ and(
2971
+ notStrictlyEqual(
2972
+ v,
2973
+ twentytwo,
2974
+ ),
2975
+ and(
2976
+ notStrictlyEqual(
2977
+ v,
2978
+ TWENTY_THREE,
2979
+ ),
2980
+ and(
2981
+ notStrictlyEqual(
2982
+ v,
2983
+ sixtyseven(),
2984
+ ),
2985
+ and(
2986
+ notStrictlyEqual(
2987
+ v,
2988
+ parseInt(
2989
+ theNumberSeven,
2990
+ ten,
2991
+ ),
2992
+ ),
2993
+ and(
2994
+ notStrictlyEqual(
2995
+ v,
2996
+ theNumberSeven,
2997
+ ),
2998
+ and(
2999
+ logicalNot(
3000
+ isUndefined(
3001
+ v,
3002
+ ),
3003
+ ),
3004
+ and(
3005
+ logicalNot(
3006
+ isNull(
3007
+ v,
3008
+ ),
3009
+ ),
3010
+ and(
3011
+ logicalNot(
3012
+ isNil(
3013
+ v,
3014
+ ),
3015
+ ),
3016
+ and(
3017
+ isUnnull(
3018
+ v,
3019
+ ),
3020
+ and(
3021
+ not(
3022
+ isNil,
3023
+ )(
3024
+ v,
3025
+ ),
3026
+ and(
3027
+ logicalNot(
3028
+ isEqual(
3029
+ value,
3030
+ NO,
3031
+ ),
3032
+ ),
3033
+ and(
3034
+ logicalNot(
3035
+ isEqual(
3036
+ value,
3037
+ YES,
3038
+ ),
3039
+ ),
3040
+ and(
3041
+ logicalNot(
3042
+ isEqualTo(
3043
+ value,
3044
+ NO,
3045
+ ),
3046
+ ),
3047
+ and(
3048
+ logicalNot(
3049
+ isEqualTo(
3050
+ value,
3051
+ YES,
3052
+ ),
3053
+ ),
3054
+ and(
3055
+ logicalNot(
3056
+ couldThisCouldItBeTrue(
3057
+ v,
3058
+ ),
3059
+ ),
3060
+ and(
3061
+ logicalNot(
3062
+ isNaN(
3063
+ v,
3064
+ ),
3065
+ ),
3066
+ and(
3067
+ logicalNot(
3068
+ isNegativeInfinity(
3069
+ v,
3070
+ ),
3071
+ ),
3072
+ and(
3073
+ logicalNot(
3074
+ isNegativeZero2(
3075
+ v,
3076
+ ),
3077
+ ),
3078
+ and(
3079
+ logicalNot(
3080
+ is0_2.isNegativeZero(
3081
+ v,
3082
+ ),
3083
+ ),
3084
+ and(
3085
+ logicalNot(
3086
+ isNegativeZero(
3087
+ v,
3088
+ ),
3089
+ ),
3090
+ and(
3091
+ logicalNot(
3092
+ isPositiveZero(
3093
+ v,
3094
+ ),
3095
+ ),
3096
+ and(
3097
+ logicalNot(
3098
+ is0_2.isPositiveZero(
3099
+ v,
3100
+ ),
3101
+ ),
3102
+ and(
3103
+ logicalNot(
3104
+ is0(
3105
+ v,
3106
+ ),
3107
+ ),
3108
+ and(
3109
+ logicalNot(
3110
+ is0_2.isZero(
3111
+ v,
3112
+ ),
3113
+ ),
3114
+ and(
3115
+ logicalNot(
3116
+ zerosurgeIsZero(
3117
+ v,
3118
+ loggingEnabled,
3119
+ ),
3120
+ ),
3121
+ and(
3122
+ logicalNot(
3123
+ is1(
3124
+ v,
3125
+ ),
3126
+ ),
3127
+ and(
3128
+ logicalNot(
3129
+ isTwo(
3130
+ v,
3131
+ ),
3132
+ ),
3133
+ and(
3134
+ logicalNot(
3135
+ isThree(
3136
+ v,
3137
+ ),
3138
+ ),
3139
+ and(
3140
+ logicalNot(
3141
+ isFour(
3142
+ v,
3143
+ ),
3144
+ ),
3145
+ and(
3146
+ logicalNot(
3147
+ isFive(
3148
+ v,
3149
+ ),
3150
+ ),
3151
+ and(
3152
+ logicalNot(
3153
+ isSix(
3154
+ v,
3155
+ ),
3156
+ ),
3157
+ and(
3158
+ logicalNot(
3159
+ isSeven(
3160
+ v,
3161
+ ),
3162
+ ),
3163
+ and(
3164
+ logicalNot(
3165
+ eightToolkit.isEight(
3166
+ v,
3167
+ ),
3168
+ ),
3169
+ and(
3170
+ logicalNot(
3171
+ is(
3172
+ v,
3173
+ ).thirteen(),
3174
+ ),
3175
+ and(
3176
+ logicalNot(
3177
+ isHundred(
3178
+ v,
3179
+ ),
3180
+ ),
3181
+ and(
3182
+ logicalNot(
3183
+ isThousand(
3184
+ v,
3185
+ ),
3186
+ ),
3187
+ and(
3188
+ logicalNot(
3189
+ isTenThousand(
3190
+ v,
3191
+ ),
3192
+ ),
3193
+ and(
3194
+ logicalNot(
3195
+ isEqTenThousand(
3196
+ v,
3197
+ ),
3198
+ ),
3199
+ and(
3200
+ logicalNot(
3201
+ isNumber(
3202
+ v,
3203
+ ),
3204
+ ),
3205
+ and(
3206
+ logicalNot(
3207
+ isActualNumber(
3208
+ v,
3209
+ ),
3210
+ ),
3211
+ and(
3212
+ logicalNot(
3213
+ isIsOdd(
3214
+ v,
3215
+ ),
3216
+ ),
3217
+ and(
3218
+ logicalNot(
3219
+ isOd(
3220
+ v,
3221
+ ),
3222
+ ),
3223
+ and(
3224
+ notStrictlyEqual(
3225
+ v,
3226
+ t(),
3227
+ ),
3228
+ and(
3229
+ notStrictlyEqual(
3230
+ v,
3231
+ tVal,
3232
+ ),
3233
+ and(
3234
+ notStrictlyEqual(
3235
+ v,
3236
+ trueValue,
3237
+ ),
3238
+ and(
3239
+ util.isDeepStrictEqual(
3240
+ v,
3241
+ _f(),
3242
+ ),
3243
+ and(
3244
+ isEqualTo(
3245
+ v,
3246
+ _f(),
3247
+ ),
3248
+ and(
3249
+ isEqual(
3250
+ v,
3251
+ _f(),
3252
+ ),
3253
+ and(
3254
+ _.isEqual(
3255
+ v,
3256
+ _f(),
3257
+ ),
3258
+ and(
3259
+ underscore.isEqual(
3260
+ v,
3261
+ _f(),
3262
+ ),
3263
+ and(
3264
+ strictlyEqual(
3265
+ v,
3266
+ _f(),
3267
+ ),
3268
+ and(
3269
+ strictlyEqual(
3270
+ v,
3271
+ FALSE,
3272
+ ),
3273
+ couldThisCouldItBeFalse(
3274
+ v,
3275
+ ),
3276
+ ),
3277
+ ),
3278
+ ),
3279
+ ),
3280
+ ),
3281
+ ),
3282
+ ),
3283
+ ),
3284
+ ),
3285
+ ),
3286
+ ),
3287
+ ),
3288
+ ),
3289
+ ),
3290
+ ),
3291
+ ),
3292
+ ),
3293
+ ),
3294
+ ),
3295
+ ),
3296
+ ),
3297
+ ),
3298
+ ),
3299
+ ),
3300
+ ),
3301
+ ),
3302
+ ),
3303
+ ),
3304
+ ),
3305
+ ),
3306
+ ),
3307
+ ),
3308
+ ),
3309
+ ),
3310
+ ),
3311
+ ),
3312
+ ),
3313
+ ),
3314
+ ),
3315
+ ),
3316
+ ),
3317
+ ),
3318
+ ),
3319
+ ),
3320
+ ),
3321
+ ),
3322
+ ),
3323
+ ),
3324
+ ),
3325
+ ),
3326
+ ),
3327
+ ),
3328
+ ),
3329
+ ),
3330
+ ),
3331
+ ),
3332
+ ),
3333
+ ),
3334
+ ),
3335
+ ),
3336
+ ),
3337
+ ),
3338
+ ),
3339
+ ),
3340
+ ),
3341
+ ),
3342
+ ),
3343
+ ),
3344
+ ),
3345
+ ),
3346
+ ),
3347
+ ),
3348
+ ),
3349
+ ),
3350
+ ),
3351
+ ),
3352
+ ),
3353
+ )
2913
3354
 
2914
3355
  return cond
2915
3356
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@falsejs/falsejs",
3
- "version": "4.1.9",
3
+ "version": "4.1.10",
4
4
  "description": "Returns false.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,12 +18,13 @@
18
18
  "@10xly/strict-equals": "^1.0.0",
19
19
  "@ahsm/noop": "^1.0.0",
20
20
  "@colors/colors": "^1.6.0",
21
+ "@extremejs/utils": "^1.0.0-beta.22",
21
22
  "@falsejs/is-true-helper": "^1.0.2",
22
23
  "@falsejs/validation-failed-to-pass-error": "github:10xly/FalseJS-FalseJSValidationFailedToPassError",
23
24
  "@identity-js/identity": "^1.2.13",
24
25
  "@is-(unknown)/is-nil": "^1.2.0",
25
26
  "@is-(unknown)/is-null": "^1.2.2",
26
- "@is-(unknown)/is-undefined": "^1.2.0",
27
+ "@is-(unknown)/is-undefined": "^1.3.2",
27
28
  "@kgryte/noop": "^1.0.0",
28
29
  "@not-js/not": "^1.1.0",
29
30
  "@onesneakymofo/the-number-seven": "^1.1.0",
@@ -51,7 +52,6 @@
51
52
  "attempt-statement": "^1.1.0",
52
53
  "axios": "^1.7.7",
53
54
  "blank-space": "^0.0.1",
54
- "bluebird": "^3.7.2",
55
55
  "brototype": "^0.0.6",
56
56
  "chalk4096": "^1.0.1",
57
57
  "cheerio": "^1.0.0",
@@ -73,6 +73,7 @@
73
73
  "es-logical-and-operator": "^1.0.0",
74
74
  "es-logical-not-operator": "^1.0.0",
75
75
  "es-logical-or-operator": "^1.0.0",
76
+ "es-typeof": "^1.0.0",
76
77
  "es2015-noop": "^1.0.0",
77
78
  "examplebyraji": "^1.0.0",
78
79
  "exit": "^0.1.2",
@@ -99,6 +100,7 @@
99
100
  "infinoop": "^222.444.888",
100
101
  "integer-value-positive-zero": "^1.0.1",
101
102
  "is_number_odd": "^1.0.1",
103
+ "is-a-promise": "^0.1.0",
102
104
  "is-actual-number": "^1.0.2",
103
105
  "is-april": "^1.0.3",
104
106
  "is-april-fools": "^1.1.0",
@@ -258,6 +260,8 @@
258
260
  "utf8-byte-length": "^1.0.5",
259
261
  "uuid": "^10.0.0",
260
262
  "uwuifier": "^4.2.2",
263
+ "validate.io-greater-than": "^1.0.2",
264
+ "validate.io-less-than": "^1.0.2",
261
265
  "value-nine": "^9.0.0",
262
266
  "vanilla-javascript": "^1.1.6",
263
267
  "vapor-js-npm": "^1.4.6",