1.0.5 • Published 2 years ago

if-not v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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!
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago