An open API service indexing awesome lists of open source software.

https://github.com/writetome51/javascript-not

An alternative to the sneaky ! negation operator for Javascript
https://github.com/writetome51/javascript-not

alternative javascript negation operator substitute

Last synced: about 1 month ago
JSON representation

An alternative to the sneaky ! negation operator for Javascript

Awesome Lists containing this project

README

          

# not(booleanExpression): boolean

It's an alternative to writing `!(booleanExpression)`.
`not` is just a little more noticeable than the sneaky `!` negation operator.

## Examples
```js
not(false); // --> true

not(true); // --> false

not(1 === 2); // --> true

if ( not( isEmpty( [1,2,3,4] ) ) ) {
console.log('The array contains items');
}
// console: 'The array contains items'
```

## Installation
`npm i @writetome51/not`

## Loading
```js
import { not } from '@writetome51/not';
```