-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FalseJS. The ultimate library for the boolean value false
- Loading branch information
0 parents
commit c908072
Showing
17 changed files
with
9,108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
testing.js | ||
t.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
testing.js | ||
t.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true, | ||
"bracketSpacing": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Authors | ||
- tj-commits/87f- | ||
|
||
Authors of packages used by FalseJS coming soon (unless someone is willing to do it for me, then contact me at [email protected]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# !!!! THIS LIST HAS BAD WORDS !!!! | ||
This is the list of bad words that you can not use, referenced in the [code of conduct](CODE_OF_CONDUCT.md). If you do not want to see bad words, close this document immediately. Otherwise scroll down. | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
The following words are unacceptable and you should not be able to say or comment them, no matter the capitalization, in this community. However, any words not in this list are acceptable, except in this markdown file. | ||
- Cunt | ||
- Nigger | ||
- Motherfucker | ||
- C**t | ||
- C*nt | ||
- Cu*t | ||
- N*gger | ||
- N***er | ||
- N***** | ||
- Motherf*cker | ||
- Motherf**ker | ||
|
||
All other words are allowed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
|
||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders of the *FalseJS* project pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, caste, color, religion, or sexual | ||
identity and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the overall | ||
community | ||
* ~~Being loyal with their entire mind and body and soul to Murray~~ | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized imagery, and sexual attention or advances of | ||
any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks, or any word on the [bad word list](BAD_WORDS.md) | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email address, | ||
without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
* Being hateful to JavaScript and saying it is not a perfect language (because it is) | ||
* Hating this library | ||
* ~~Thinking this library is not a joke~~ ([this library actually might be a joke](IS_THIS_LIBRARY_A_JOKE.md)) | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official email address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at the email [email protected]. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of [any bad words from this list of bad words](BAD_WORDS.md) or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series of | ||
actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or permanent | ||
ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within the | ||
community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.1, available at | ||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. | ||
|
||
Community Impact Guidelines were inspired by | ||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at | ||
[https://www.contributor-covenant.org/translations][translations]. | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html | ||
[Mozilla CoC]: https://github.com/mozilla/diversity | ||
[FAQ]: https://www.contributor-covenant.org/faq | ||
[translations]: https://www.contributor-covenant.org/translations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Examples | ||
There are some examples already in the readme no more are here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# is this library a joke | ||
Probably. | ||
|
||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
|
||
Yes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2004 Sam Hocevar <[email protected]> | ||
|
||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<img src="falsejs-logo.png" alt="Logo" width="600"> | ||
|
||
# FalseJS | ||
> #### Better than the keyword itself. | ||
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. Look at the source code and be amazed. | ||
|
||
## Installation | ||
Install FalseJS with your favorite package manager. | ||
|
||
NPM: `npm install falsejs` | ||
|
||
Yarn: `yarn add falsejs` | ||
|
||
PNPM: `pnpm add falsejs` | ||
|
||
Import it with require: | ||
```javascript | ||
const f = require('falsejs') | ||
``` | ||
Import it with import: | ||
```javascript | ||
import f from 'falsejs' | ||
``` | ||
|
||
## Usage | ||
`f.False` is a function that calculates the boolean value false and returns it. It takes three arguments. | ||
``` | ||
f.False(loggingEnabled?: "yes" | "no", shouldDoSomethingAsync?: "yes" | "no", shouldDoSomethingAsyncWithIsTenThousand?: "yes" | "no") | ||
``` | ||
The 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. | ||
|
||
The 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"`. | ||
|
||
The 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. | ||
|
||
## Example | ||
```javascript | ||
const f = require('falsejs') | ||
const False = f.False('yes', 'no', 'no') // outputs a bunch of logs | ||
|
||
console.log(False) // outputs false | ||
``` | ||
|
||
## `isFalse` function | ||
FalseJS 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). `f.isFalse` just takes in a value and returns true if the value is false. | ||
|
||
Example: | ||
|
||
```javascript | ||
const f = require('falsejs') | ||
const False = f.False('yes', 'no', 'no') | ||
|
||
console.log(f.isFalse(False)) // true | ||
console.log(f.isFalse(false)) // probably true | ||
console.log(f.isFalse(true)) // probably false | ||
console.log(f.isFalse('hi')) // false | ||
``` | ||
|
||
`isFalse` can also be used as an alternative to running the `f.False` function and instead just passing a value that isn't false into the `f.isFalse` (actually there's no point doing that because `f.False` can output useful logs if you want it to and is safer and better while `f.isFalse` is definitely not just made to be used as a tool to get the value of false). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Security Policy | ||
|
||
FalseJS adheres to the [Eclipse Foundation Vulnerability Reporting Policy](https://www.eclipse.org/security/policy/). | ||
|
||
## How To Report a Vulnerability | ||
|
||
If you think you have found a vulnerability in this repository, please report it to us through coordinated disclosure. | ||
Instead, you can report it using one of the following ways: | ||
|
||
* Contact me via my email: [email protected] | ||
* Create an issue (just go to the f*cking issues tab and report a security vulnerability or whatever security hole thing you wanted to report) | ||
|
||
Please include as much of the information listed below as you can to help us better understand and resolve the issue: | ||
|
||
* The type of issue | ||
* Affected version(s) | ||
* Impact of the issue, including how an attacker might exploit the issue | ||
* Step-by-step instructions to reproduce the issue | ||
* The location of the affected source code (tag/branch/commit or direct URL) | ||
* Full paths of source file(s) related to the manifestation of the issue | ||
* Any special configuration required to reproduce the issue | ||
* Any log files that are related to this issue (if possible) | ||
* Proof-of-concept or exploit code (if possible) | ||
|
||
This information will help us figure out your report more quickly. | ||
|
||
## Supported Versions | ||
all versions are supported. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.