{"id":15560945,"url":"https://github.com/10xEngineersQualityProgramming/FalseJS","last_synced_at":"2025-03-06T17:31:42.029Z","repository":{"id":254967699,"uuid":"847968931","full_name":"10xEngineersQualityProgramming/FalseJS","owner":"10xEngineersQualityProgramming","description":"The ultimate library for getting false.","archived":false,"fork":false,"pushed_at":"2025-01-21T22:12:33.000Z","size":7502,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T18:37:26.280Z","etag":null,"topics":["false","ironically-shitty","js","nodejs","noop","nothing","nothing-to-see-here","this-is-dumb","useless"],"latest_commit_sha":null,"homepage":"https://10xEngineersQualityProgramming.github.io/falsejs.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/10xEngineersQualityProgramming.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T22:25:27.000Z","updated_at":"2025-01-14T08:46:33.000Z","dependencies_parsed_at":"2024-10-29T18:51:08.655Z","dependency_job_id":null,"html_url":"https://github.com/10xEngineersQualityProgramming/FalseJS","commit_stats":null,"previous_names":["tj-commits/falsejs","10xengineersqualityprogramming/falsejs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10xEngineersQualityProgramming%2FFalseJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10xEngineersQualityProgramming%2FFalseJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10xEngineersQualityProgramming%2FFalseJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10xEngineersQualityProgramming%2FFalseJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10xEngineersQualityProgramming","download_url":"https://codeload.github.com/10xEngineersQualityProgramming/FalseJS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242254162,"owners_count":20097529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["false","ironically-shitty","js","nodejs","noop","nothing","nothing-to-see-here","this-is-dumb","useless"],"created_at":"2024-10-02T16:04:16.212Z","updated_at":"2025-03-06T17:31:42.021Z","avatar_url":"https://github.com/10xEngineersQualityProgramming.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"falsejs-logo.png\" alt=\"Logo\" width=\"600\"\u003e\n\n# FalseJS\n\n#### Better than the keyword itself.\n\nEver 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.\n\nThe 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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\"\n\n## Installation\n\nInstall FalseJS with your favorite package manager.\n\nNPM: `npm install falsejs`\n\nYarn: `yarn add falsejs`\n\nPNPM: `pnpm add falsejs`\n\nImport it with require:\n\n```javascript\nconst falsejs = require(\"falsejs\").default\n```\n\nImport it with import:\n\n```javascript\nimport falsejs from \"falsejs\"\n```\n\n## Usage\n\n`falsejs.False` is a function that calculates the boolean value false and returns it. It takes three arguments.\n\n```\nfunction False(\n  loggingEnabled?: \"yes\" | \"no\",\n  shouldDoSomethingAsync?: \"yes\" | \"no\",\n  shouldDoSomethingAsyncWithIsTenThousand?: \"yes\" | \"no\",\n  disableAprilFoolsSideEffects?: \"yes\" | \"no\",\n  definitelyDisableAprilFoolsSideEffects?: \"yes\" | \"no\",\n  strictDisableAprilFoolsSideEffectsCheck?: \"yes\" | \"no\",\n  openRandomImageOfDofleWhenDone?: \"yes\" | \"no\"\n): boolean\n```\n\nThe first argument is `loggingEnabled`, which is whether to output useful and funny logs or not. This can be `\"yes\"` or `\"no\"`. Some logs may still be output even when you pass in `\"no\"`, because FalseJS uses other libraries that may log things without user consent. `\"yes\"` and `\"no\"` are basically `true` and `false`, except the whole reason you're calling the function is to get a boolean, so it wouldn't make sense to pass in a boolean.\n\nThe second argument, `shouldDoSomethingAsync`, is whether FalseJS should do an asyncronhous promise-based setTimeout and when it's done, if logging is enabled, output `[falsejs] Did something async` in green. This is just a pointless feature that is by default `\"no\"`, because it can be `\"yes\"` or `\"no\"`.\n\nThe third argument, `shouldDoSomethingAsyncWithIsTenThousand`, is whether `is-ten-thousand`, a package used by FalseJS, should have an asynchronous promise-based setTimeout before it checks if a value is 10,000. It can be `\"yes\"` or `\"no\"`.\n\nThe third and fourth arguments, `disableAprilFoolsSideEffects` and `definitelyDisableAprilFoolsSideEffects`, can be `\"yes\"` or `\"no\"`. Both of them have to be `\"yes\"` to bypass the side effects of it being April Fools? What side effects, you may ask? Well, let's just say, FalseJS does something different on April Fools. If these are enabled when it's not April Fools, then an error will be thrown, unless the fifth argument, `strictDisableAprilFoolsSideEffectsCheck`, is `\"no\"`.\n\nThe sixth argument, `openRandomImageOfDofleWhenDone`, can be `\"yes\"` or `\"no\"`. If it is `\"yes\"`, then a random image of Sindre Sorhus's cat Dofle will be opened after false is calculated.\n\n## Example\n\n```javascript\nconst falsejs = require(\"falsejs\").default\nconst falseValue = falsejs.False(\"yes\", \"no\", \"no\", \"yes\", \"yes\", \"no\", \"no\") // outputs a bunch of logs\n\nconsole.log(falseValue) // outputs false\n```\n\n## `isFalse` function\n\nFalseJS also exports a function called `isFalse`, which returns true if the value is false, otherwise false. This can be used to test whether FalseJS worked and returned false (like it wouldn't, so there's no need to do that). `falsejs.isFalse` just takes in a value and returns true if the value is false.\n\nIt takes in too parameters, the value to check whether it is false, and `loggingEnabled` which can be `\"yes\"` or `\"no\"`.\n\nExample:\n\n```javascript\nconst falsejs = require(\"falsejs\").default\nconst falseValue = falsejs.False(\"no\", \"no\", \"no\")\nconst trueValue = require(\"true-value\")\n\nconsole.log(falsejs.isFalse(falseValue)) // true\nconsole.log(falsejs.isFalse(false)) // probably true\nconsole.log(falsejs.isFalse(trueValue)) // false\nconsole.log(falsejs.isFalse(\"hi\")) // false\n```\n\n`falsejs.isFalse` can also be used as an alternative to running the `falsejs.False` function and instead just passing a value that isn't false into `falsejs.isFalse`.\n\n## CLI\n\nNPM:\n\n```\nnpm install -g falsejs\n```\n\nYarn:\n\n```\nyarn add -g falsejs\n```\n\nPNPM:\n\n```\npnpm add -g falsejs\n```\n\nFalseJS provides a CLI.\n\n```bash\n$ npm install -g falsejs\n$ false\nfalse\n```\n\n## jQuery plugin\n\nA jQuery plugin is also provided for FalseJS. Here is an example:\n\n```javascript\nconst falsejs = require(\"falsejs\").default\nglobal.jQuery = require(\"jquery\")\nfalsejs.injectIntojQuery()\n\nconst $ = jQuery\n\nconst myFalseValue = $.False(\"no\", \"no\", \"no\", \"yes\", \"yes\", \"no\")\nconsole.log(myFalseValue) // false\nconsole.log($.isFalse(myFalseValue)) // true\n```\n\n## Express middleware\n\nExpress middleware is also exported. Here is an example:\n\n```javascript\nconst express = require(\"express\")\nconst falsejs = require(\"falsejs\").default\nconst Bro = require(\"brototype\")\n\nconst app = express()\nconst PORT = Bro(process).doYouEven(\"env.PORT\") ? process.env.PORT : 3000\n\napp.use(falsejs.expressMiddleware)\n\napp.get(\"/\", (req, res) =\u003e {\n  res.send(req.isFalse(req.False())) // sends true to the client haha! i got out!\n})\n\napp.listen(PORT)\n```\n\n## April Fools Behavior\n\n### **Not April Fools Day**\n\n- **FalseJS will return** `false` by default.\n- The flags `disableAprilFoolsSideEffects` and `definitelyDisableAprilFoolsSideEffects` **do not affect the behavior** of FalseJS. It behaves normally as it would on any non-April Fools' Day.\n  - However, if `strictDisableAprilFoolsSideEffectsCheck` is **not `no\"`** and instead `\"yes\"` (by default it's `\"yes\"`), it will throw an error if these options are set to `\"yes\"`, because it's not April Fools' Day, and there are no side effects to disable.\n  - If `strictDisableAprilFoolsSideEffectsCheck` is set to **\"no\"**, FalseJS behaves normally without throwing an error, even if the side effect parameters are set to `\"yes\"`.\n\n### **April Fools Day**\n\n- **On April Fools' Day**, FalseJS **always returns `true`**, regardless of the state of the flags.\n- **To prevent this behavior**, you must set both `disableAprilFoolsSideEffects` to `\"yes\"` and `definitelyDisableAprilFoolsSideEffects` to `\"yes\"` when you call FalsejS.\n  - If these flags are set to `\"yes\"`, FalseJS will return its expected behavior (return `false`), even on April Fools' Day.\n\n### **Best Usage For April Fools Behavior**\n\nThis usage ensures that you will always get `false` whether it's April Fools or not and no errors.\n\n```js\nconst falsejs = require(\"falsejs\").default\nconst isAprilFools = require(\"is-april-fools\")\nconst disableAprilFoolsSideEffects = isAprilFools() ? \"yes\" : \"no\"\n\nconst falseValue = falsejs.False(\n  \"no\",\n  \"no\",\n  \"no\" /*the first three options you can choose, for examples we set them all to \"no\"*/,\n  disableAprilFoolsSideEffects,\n  disableAprilFoolsSideEffects,\n  \"yes\"\n)\n\n// or you can do this, but the above is better\n\nconst falseValue = falsejs.False(\n  \"no\",\n  \"no\",\n  \"no\" /*the first three options you can choose, for examples we set them all to \"no\"*/,\n  \"yes\",\n  \"yes\",\n  \"no\"\n)\n```\n\n## Important\nIn the console you may see this error:\n```\nWarning: 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.\n    at div\n    at NoComponent\n```\nThis 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.\n\n## Related Projects\n\n- [true-value](https://github.com/tj-commits/true-value) (the sister project)\n- [false](https://github.com/mde/false)\n- [true](https://github.com/mde/true)\n- [alternative-true](https://github.com/donavon/alternative-true)\n- [undefined-is-a-function](https://github.com/donavon/undefined-is-a-function)\n\n## License\n\nFalseJS uses the 10xGPWTHPL license.\n\n## made with HEAVY BLACK HEART U+2764\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10xEngineersQualityProgramming%2FFalseJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F10xEngineersQualityProgramming%2FFalseJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10xEngineersQualityProgramming%2FFalseJS/lists"}