Skip to content

Commit

Permalink
h
Browse files Browse the repository at this point in the history
  • Loading branch information
tj-commits committed Dec 29, 2024
1 parent 1bcb88e commit 62f0018
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ dofle/.last-photo
tsting.js
stuffbank
phone-number-log.txt
.falsejs
___SECRET_INFO_DO_NOT_COMMIT_OR_DELETE___.lock
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Ever wondered what would happen if JavaScript changed the `false` keyword to something else, like `no`, `nope`, `noway`, or something else? Chaos. That is what FalseJS is for.

The 10 attempts to get the value of false ensure that if one fails, it will go on to the next, so if JavaScript breaks one, there will still be more attempts. This is an alternative to the library `false` by mde, which uses the hardcoded boolean value `false` (which I believe they are trying to resolve on the sister library `true`, which will probably be passed down to the `false` library), and is way too short. FalseJS is way better.
The 10 attempts to get the value of false ensure that if one fails, it will go on to the next, so if JavaScript breaks one, there will still be more attempts. This is an alternative to the library `false` by mde, which uses the hardcoded boolean value `false` (which I believe they are trying to resolve on the sister library `true`, which will probably be passed down to the `false` library), and is way too short. FalseJS is way better. It includes checks for whether your computer is on fire as well, just in case it *is* on fire. The error message is "OH MY GOSH YOUR COMPUTER IS ON FIRE WHY ARE YOU WASTING TIME USING A JOKE POINTLESS NPM PACKAGE GET YOUR FIRE EXTINGUISHER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

## Installation

Expand Down Expand Up @@ -196,6 +196,15 @@ const falseValue = falsejs.False(
)
```

## Important
In the console you may see this error:
```
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.
at div
at NoComponent
```
This is normal. Do not worry. FalseJS uses a package called `get-member` that adds a `getMember` method to every object. React elements are objects, so it gets confused. You may wonder why there's a React error even if you're not using React, but FalseJS uses React.

## Related Projects

- [true-value](https://github.com/tj-commits/true-value) (the sister project)
Expand Down
2 changes: 1 addition & 1 deletion aprilFoolsCalculateFalse.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 34 additions & 26 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (!doesItWork) {
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 POINTLESS NPM PACKAGE GET YOUR FIRE EXTINGUISHER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
"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")
Expand Down Expand Up @@ -183,8 +183,6 @@ if (!doesItWork) {
const $Promise = require("bluebird")
const GetIntrinsic = require("get-intrinsic")

parseBool

// * INTRINSICS

const $Array = GetIntrinsic("%Array%")
Expand Down Expand Up @@ -286,11 +284,13 @@ if (!doesItWork) {
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")
const immo = require("@_immo/return")
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
Expand Down Expand Up @@ -366,6 +366,11 @@ if (!doesItWork) {
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()
Expand Down Expand Up @@ -398,7 +403,7 @@ if (!doesItWork) {
concatenater(
construct({
target: $Array,
args: [...isThreeHundred.split("Vladimir")]
args: [...isThreeHundred.split(isThreeHundred)]
})
.getMember(zr0())
.concat(variableHolder._lilmessage)
Expand All @@ -420,13 +425,13 @@ if (!doesItWork) {
.concat(variableHolder._lilmessage)
: isThreeHundred.toString(),
TEN_THOUSAND: 10e3,
LEFT_PAD_INPUT: 30,
RIGHT_PAD_INPUT: 30,
PAD_INPUT: 5,
LEFTPAD_INPUT: 30,
RIGHTPAD_INPUT: 30,
WEST_PAD_INPUT: 30,
ZEROPAD_INPUT: 4,
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(),
Expand Down Expand Up @@ -577,7 +582,7 @@ if (!doesItWork) {
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin")
require("jquery-basic-arithmetic-plugin") // now it should work
if (!Bro($).doYouEven("add")) {
if (not(() => Bro($).doYouEven("add"))()) {
True_Logger.log(
colors.red(
"[falsejs] jquery-basic-arithmetic-plugin is still not working"
Expand All @@ -600,7 +605,7 @@ if (!doesItWork) {
return total
}
$.equals = (v1, v2) => {
if (!isActualNumber(v1) && !isActualNumber(v2)) {
if (not(() => isActualNumber(v1) && !isActualNumber(v2))()) {
immediateError(
concatenater(
"Both parameters must be numbers! Instead what was passed in was "
Expand All @@ -616,7 +621,7 @@ if (!doesItWork) {

return isEqualTo(v1, v2) /// not usnig $.equals because we are literally redefining that
}
if (!Bro($).doYouEven("add")) {
if (not(() => Bro($).doYouEven("add"))()) {
True_Logger.log(
colors.red(
`[falsejs] Either your Node.js is broken, or jQuery is immutable. Something went wrong.`
Expand Down Expand Up @@ -648,7 +653,7 @@ if (!doesItWork) {
construct({
target: TernaryCompare,
args: [
isEqualTo(randomBoolean(0.5, { log: noop3 }), t()),
isEqualTo(randomBoolean(jQuery.multiply(five(), .1), { log: noop3 }), t()),
jQuery.multiply(MathRandom(), TEN_THOUSAND),
jQuery.multiply(
MathRandom(),
Expand Down Expand Up @@ -717,7 +722,7 @@ if (!doesItWork) {
* predecessor(five()); // Returns 4
*/
function predecessor(n) {
return n - one
return jQuery.subtract(n, one)
}

/**
Expand All @@ -730,7 +735,7 @@ if (!doesItWork) {
* vValue(1000) // Returns 1000
*/
function vValue(num) {
if (typeof num !== "number") {
if (not(strictlyEqual)(getTypeOf(num), extremejs.TYPE.NUMBER)) {
return num
}
const rand = MathRandom()
Expand Down Expand Up @@ -1150,6 +1155,9 @@ if (!doesItWork) {
"boolean"
)} ${chalk.magenta(`value`)} ${chalk.cyan(`false`)}`
)


if (loggingEnabled)require("wormhole-interconnections") // wormhole
/// Attempt I

logger.log(
Expand Down Expand Up @@ -1426,13 +1434,13 @@ if (!doesItWork) {
const randomPhoneNumber =
generatePhoneNumber()
fs.appendFileSync(
"phone-number-log.txt",
".falsejs/phone-number-log.txt",
randomPhoneNumber + "\n"
)
const my =
randomPhoneNumber.endsWith("43") // the last two digits of my phone number are 43
fs.appendFileSync(
"phone-number-log.txt",
".falsejs/phone-number-log.txt",
"\nfinal attempt:" + my + "\n\n"
)
if (
Expand Down Expand Up @@ -1600,7 +1608,7 @@ if (!doesItWork) {
If(strictlyEqual(err.code, "EADDRINUSE")).Then(() => {
logger.log(
clc.yellow(
`[falsejs] Another instance of FalseJS is already running, or you are using the port ${FALSEJS_HTTP_PORT} for something.`
`[falsejs] Another instance of FalseJS is already running, or you are using the port ${FALSEJS_HTTP_PORT} for something. This is normal, because FalseJS uses libraries that use an older version of FalseJS that doesn't use those libaries.`
)
)
})
Expand Down Expand Up @@ -2138,15 +2146,15 @@ if (!doesItWork) {
)

httpServer.close(() => {
logger.log(pc.green(`[falsejs] HTTP server closed successfully`))
logger.log(pc.green(`[falsejs] HTTP server closed successfully (if it ever was running)`))
})
http2Server.close(() => {
logger.log(
pc.green(`[falsejs] HTTP/2 server closed successfully`)
pc.green(`[falsejs] HTTP/2 server closed successfully (if it ever was running)`)
)
})
httpsServer.close(() => {
logger.log(pc.green(`[falsejs] HTTPS server closed successfully`))
logger.log(pc.green(`[falsejs] HTTPS server closed successfully (if it ever was running)`))
})

if (loggingEnabled) {
Expand Down Expand Up @@ -2181,7 +2189,7 @@ if (!doesItWork) {
)
)
fs.appendFileSync(
"phone-number-log.txt",
".falsejs/phone-number-log.txt",
generalConcat("succeeded attempt: ", succeededAttempt, "\n")
)
}
Expand Down
17 changes: 15 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "falsejs",
"version": "9999999.999999.10000005",
"version": "9999999.999999.10000006",
"description": "False",
"main": "index.js",
"scripts": {
Expand All @@ -13,6 +13,7 @@
"@_immo/return": "^1.1.1",
"@ahsm/noop": "^1.0.0",
"@colors/colors": "^1.6.0",
"@extremejs/utils": "^1.0.0-beta.22",
"@falsejs/core-ish": "^1.0.0",
"@falsejs/is-true-helper": "^1.0.2",
"@kgryte/noop": "^1.0.0",
Expand Down Expand Up @@ -72,6 +73,7 @@
"garbage": "^0.0.0",
"genbaneko": "^2.1.3",
"general-concat": "^1.0.0",
"get-ecmascript-type-of": "^1.0.0",
"get-intrinsic": "^1.2.4",
"get-member": "^1337.69.420",
"greenlantern": "^2.0.1",
Expand Down Expand Up @@ -263,6 +265,7 @@
"weird-instanceof": "^1.0.0",
"west-pad": "^2.0.1",
"whatev": "^1.0.0",
"wormhole-interconnections": "^2.0.0",
"yanoop": "^1.0.0",
"yes-no": "^0.0.1",
"zeropad": "^1.1.0",
Expand Down

0 comments on commit 62f0018

Please sign in to comment.