Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logical-not

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logical-not - npm Package Compare versions

Comparing version 1.0.7 to 1.0.9

5

index.d.ts

@@ -1,2 +0,5 @@

export declare function not(value: any): boolean;
export declare function not(
value: any
): value is false | "" | 0 | null | undefined;
export default not;

2

package.json
{
"name": "logical-not",
"version": "1.0.7",
"version": "1.0.9",
"description": "Logical NOT Function",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ # Logical NOT Function

For example:
Usage:

@@ -18,6 +18,15 @@ ```js

## Installation
### Typescript support
```sh
$ npm install logical-not
```ts
function main(): void {
const div = document.querySelector("div");
// div is HTMLDivElement | null
if (not(div)) return;
// now div is HTMLDivElement
div.textContent; // ok
// ^ no 'possibly null' error
}
```

@@ -24,0 +33,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc