# null

> Null generator library

Latest version **2.0.0** (published 2019-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install null
pnpm add null
yarn add null
bun add null
```

## 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 | 2.0.0 |
| Published | 2019-05-20 |
| First published | 2011-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Qodeninja |
| Maintainers | qodeninja |
| Keywords | null |

## Links

- npm: https://www.npmjs.com/package/null
- Repository: git@qodeparty-gh:qodeparty/null
- npm.io page: https://npm.io/package/null

## Recent versions

- 2.0.0 (latest) — 2019-05-20
- 1.0.1 — 2017-03-02
- 0.0.0 — 2011-05-08

## README

# null
Null all of the things! This package was originally created as a joke, but hey now it actually does something non-trivial.

If you ever use `null` for logic tests, you can try using a `Symbol` instead via the NullRef library provided by this package.

This package provides for a `NULL` constant that is a Symbol from the Global Symbol Registry, as well as convenience methods for testing, casting, and comparing values.

## Usage

Require and reference what you need:

```javascript
const nullref   = require('null'); // note that the variable name should not be null, here we use nullref
const nulltest  = nullref.lib; // load the full library of convenience features

const isNull    = nullref.isNull // or just load the main ones you want (checks for null or NULL)
const isNullRef = nullref.isNullRef // checks for NULL only

const NULL = nullref(); // NULL symbol instance (singleton);
```

Consume and use as needed.

```javascript
let x = null;

//returns true if x is null or NULL
if( nulltest.is(x) ) //do something
if( isNull(x) ) // same as above

//cast a variable to NULL if it is null or NULL, otherwise it returns itself
if( NULL === nulltest.to(x) ) // do something

```

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