Skip to content

Negate-ts is a TypeScript library that provides a simple and intuitive way to perform logical negation of boolean values.

License

Notifications You must be signed in to change notification settings

teixeirazeus/negate-ts

Repository files navigation

banner

Negate-ts is a TypeScript library that provides a simple and intuitive way to perform logical negation of boolean values. It is designed to be flexible and reliable, and can be used in a variety of contexts.

Installation

npm install negate-ts

Usage

import { not } from 'negate-ts';

not(true); // false
not(false); // true

Why?

Read this beautiful code:

if(not(havePermission)) {
  // do something
}

You can say "not" to your code, and it will be more readable. Try this:

if(!havePermission) {
  // do something
}

It's not the same, right? How you can say "!" to your code? You can't. You can only say "not".

License

Released under the MIT License.

Copyright (c) 2023 Thiago da Silva Teixeira

About

Negate-ts is a TypeScript library that provides a simple and intuitive way to perform logical negation of boolean values.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published