Skip to content
/ if-not Public

a package that helps you to check if a condition is false without excessive use of !

License

Notifications You must be signed in to change notification settings

GDOR-11/if-not

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

if-not

a package that helps you to check if a condition is false without excessive use of !


installation:

npm install if-not



example with and without if-not:

// with if-not:
import ifnot from "if-not";

ifnot(false, console.log, "Hello world!", "second argument!");
ifnot(true, console.log, "this won't be executed!");

// without if-not: look at all the bangs! all the indentation! this is unacceptable!
if(!false) {
	console.log("Hello world!", "second argument!");
}
if(!true) {
	console.log("this won't be executed");
}

output for both:

$ node .
Hello world! second argument!

About

a package that helps you to check if a condition is false without excessive use of !

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published