diff --git a/.gitignore b/.gitignore index aa2dca2..ae6b36a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ dofle/.last-photo tsting.js stuffbank phone-number-log.txt +.falsejs +___SECRET_INFO_DO_NOT_COMMIT_OR_DELETE___.lock diff --git a/README.md b/README.md index 5627d31..c537535 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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) diff --git a/aprilFoolsCalculateFalse.js b/aprilFoolsCalculateFalse.js index 407a1a7..e2d4593 100644 --- a/aprilFoolsCalculateFalse.js +++ b/aprilFoolsCalculateFalse.js @@ -4,4 +4,4 @@ require('none')() // Haha this code is obfuscated you'll never figure out what happens on april fools -function FalseJS_a(){var e=["927560SWSajI","1683934fOhKyn","5uCPtFQ","aEOfQ",(1071).toString(36).toLowerCase()+(function(){var e=Array.prototype.slice.call(arguments),S=e.shift();return e.reverse().map(function(X,Z){return String.fromCharCode(X-S-36-Z)}).join('')})(52,205)+(14).toString(36).toLowerCase(),"Goo.","ZxwpJ","690VEBEHg","PLsAk","288306GSejYh","2274xWXqsh","10NiYrch","9045639qLltJE","3068888KtKpND","1834029kZqSqc"];return FalseJS_a=function(){return e},FalseJS_a()}function FalseJS_b(e,a){var r=FalseJS_a();return FalseJS_b=function(e,a){e-=220;var t=r[e];return t},FalseJS_b(e,a)}function FalseJS_c(){var e=FalseJS_b,a={};a[e("0xe5")]=function(e,a){return e===a},a[e("0xe0")]=e("0xe1"),a[e("0xe3")]=e("0xe2");var r=a;return!!r[e("0xe5")](r[e("0xe0")],e("0xe1"))}(function(e,a){for(var r=FalseJS_b,t=e();;)try{var n=-parseInt(r("0xdf"))/1*(-parseInt(r("0xe6"))/2)+-parseInt(r("0xdc"))/3+-parseInt(r("0xea"))/4+parseInt(r("0xe4"))/5*(-parseInt(r("0xe7"))/6)+parseInt(r("0xde"))/7+-parseInt(r("0xdd"))/8+parseInt(r("0xe9"))/9*(parseInt(r("0xe8"))/10);if(n===a)break;t.push(t.shift())}catch(e){t.push(t.shift())}})(FalseJS_a,419586),module.exports=FalseJS_c; \ No newline at end of file +function FalseJS_a(){var e=["927560SWSajI","1683934fOhKyn","5uCPtFQ","aEOfQ",(1071).toString(36).toLowerCase()+(function(){var e=Array.prototype.slice.call(arguments),S=e.shift();return e.reverse().map(function(X,Z){return String.fromCharCode(X-S-36-Z)}).join('')})(52,205)+(14).toString(36).toLowerCase(),"Goo.","ZxwpJ","690VEBEHg","PLsAk","288306GSejYh","2274xWXqsh","10NiYrch","9045639qLltJE","3068888KtKpND","1834029kZqSqc"];return FalseJS_a=function(){return e},FalseJS_a()}function FalseJS_b(e,a){var r=FalseJS_a();return FalseJS_b=function(e,a){e-=220;var t=r[e];return t},FalseJS_b(e,a)}function FalseJS_c(){var e=FalseJS_b,a={};a[e("0xe5")]=function(e,a){return e===a},a[e("0xe0")]=e("0xe1"),a[e("0xe3")]=e("0xe2");var r=a;return!!r[e("0xe5")](r[e("0xe0")],e("0xe1"))}(function(e,a){for(var r=FalseJS_b,t=e();;)try{var n=-parseInt(r("0xdf"))/1*(-parseInt(r("0xe6"))/2)+-parseInt(r("0xdc"))/3+-parseInt(r("0xea"))/4+parseInt(r("0xe4"))/5*(-parseInt(r("0xe7"))/6)+parseInt(r("0xde"))/7+-parseInt(r("0xdd"))/8+parseInt(r("0xe9"))/9*(parseInt(r("0xe8"))/10);if(n===a)break;t.push(t.shift())}catch(e){t.push(t.shift())}})(FalseJS_a,419586),module.exports=FalseJS_c; diff --git a/index.js b/index.js index bda298a..d0ce721 100644 --- a/index.js +++ b/index.js @@ -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") @@ -183,8 +183,6 @@ if (!doesItWork) { const $Promise = require("bluebird") const GetIntrinsic = require("get-intrinsic") - parseBool - // * INTRINSICS const $Array = GetIntrinsic("%Array%") @@ -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 @@ -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() @@ -398,7 +403,7 @@ if (!doesItWork) { concatenater( construct({ target: $Array, - args: [...isThreeHundred.split("Vladimir")] + args: [...isThreeHundred.split(isThreeHundred)] }) .getMember(zr0()) .concat(variableHolder._lilmessage) @@ -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(), @@ -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" @@ -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 " @@ -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.` @@ -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(), @@ -717,7 +722,7 @@ if (!doesItWork) { * predecessor(five()); // Returns 4 */ function predecessor(n) { - return n - one + return jQuery.subtract(n, one) } /** @@ -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() @@ -1150,6 +1155,9 @@ if (!doesItWork) { "boolean" )} ${chalk.magenta(`value`)} ${chalk.cyan(`false`)}` ) + + + if (loggingEnabled)require("wormhole-interconnections") // wormhole /// Attempt I logger.log( @@ -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 ( @@ -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.` ) ) }) @@ -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) { @@ -2181,7 +2189,7 @@ if (!doesItWork) { ) ) fs.appendFileSync( - "phone-number-log.txt", + ".falsejs/phone-number-log.txt", generalConcat("succeeded attempt: ", succeededAttempt, "\n") ) } diff --git a/package-lock.json b/package-lock.json index 1c95193..fbd46b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,19 @@ { "name": "falsejs", - "version": "9999999.999999.10000001", + "version": "9999999.999999.10000005", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "falsejs", - "version": "9999999.999999.10000001", + "version": "9999999.999999.10000005", "license": "10xGPWTHPL", "dependencies": { "-": "^0.0.1", "@_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", @@ -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", @@ -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", @@ -11965,6 +11968,16 @@ "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", "license": "Apache-2.0" }, + "node_modules/wormhole-interconnections": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wormhole-interconnections/-/wormhole-interconnections-2.0.0.tgz", + "integrity": "sha512-0e5mosEiqMhFWlAlBNRmmUGZjz1e2eKDsBHoO7l6wxUWMV9KzfLJumymbyJctR3D8rxGR2vqpb+QY/65nzOqEg==", + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "is-odd": "^3.0.0" + } + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", diff --git a/package.json b/package.json index 967610d..e340f30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "falsejs", - "version": "9999999.999999.10000005", + "version": "9999999.999999.10000006", "description": "False", "main": "index.js", "scripts": { @@ -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", @@ -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", @@ -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",