# is-nullish

> Test a value for nullishness.

Latest version **1.0.0** (published 2016-09-13) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install is-nullish
pnpm add is-nullish
yarn add is-nullish
bun add is-nullish
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-09-13 |
| First published | 2016-09-13 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | vonthar |
| Maintainers | vonthar |
| Keywords | is, null, nil, empty |

## Links

- npm: https://www.npmjs.com/package/is-nullish
- Repository: https://github.com/vonthar/node-is-nullish
- Issues: https://github.com/vonthar/node-is-nullish/issues
- npm.io page: https://npm.io/package/is-nullish

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-09-13

## README

node-is-nullish
==========================================================================================
[![NPM Package](https://img.shields.io/npm/v/is-nullish.svg)](https://www.npmjs.org/package/is-nullish)
[![Build Status](https://travis-ci.org/vonthar/node-is-nullish.svg?branch=master)](https://travis-ci.org/vonthar/node-is-nullish/branches)
[![Coverage Status](https://coveralls.io/repos/github/vonthar/node-is-nullish/badge.svg?branch=master)](https://coveralls.io/github/vonthar/node-is-nullish?branch=master)
[![Dependency Status](https://david-dm.org/vonthar/node-is-nullish.svg)](https://david-dm.org/vonthar/node-is-nullish)

**Example**  
```js
var isNull = require("is-nullish");
isNull("");
//true
isNull(0);
//false
```
Installation
------------
`npm i is-nullish`

Usage
-----
### Differences between falsy, is-nullish, and [is-empty](https://www.npmjs.com/package/is-empty):
| value             | typeof value  | Boolean(value) | isNull(value) | isEmpty(value) |
| ----------------- | ------------- | -------------- | ------------- | -------------- |
| *not defined*     | "undefined"   | false          | true          | true           |
| undefined         | "undefined"   | false          | true          | true           |
| null              | "object"      | false          | true          | true           |
| ""                | "string"      | false          | true          | true           |
| NaN               | "number"      | false          | true          | false          |
| 0                 | "number"      | false          | false         | true           |
| false             | "boolean"     | false          | false         | false          |
| {}                | "object"      | true           | true\*        | true           |
| []                | "object"      | true           | true\*        | true           |
| function () {}    | "function"    | true           | true\*        | true           |
\*Objects and functions are nullish unless they have non-nullish enumerable properties.


API Reference
-------------
<a name="exp_module_is-nullish--isNull"></a>

### isNull(value) ⇒ <code>boolean</code> ⏏
**Kind**: Exported function  
**Params**

- value <code>\*</code>

**Example**  
```js
var f = function (x) { return x; };
isNull(f);
//true
f.objective = "objectify";
isNull(f);
//false
```


License
-------
MPL 2.0

---
_Source: https://npm.io/package/is-nullish · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
