# @typeforce/is-value

> Determine if a value is not `undefined` or `null`

Latest version **1.0.2** (published 2018-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @typeforce/is-value
pnpm add @typeforce/is-value
yarn add @typeforce/is-value
bun add @typeforce/is-value
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-02-12 |
| First published | 2018-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | George Thomas |
| Maintainers | mgthomas99 |
| Keywords | assert, is, value |

## Links

- npm: https://www.npmjs.com/package/@typeforce/is-value
- Repository: https://github.com/Typeforce-JS/is-value
- Homepage: https://github.com/Typeforce-JS/is-value#readme
- Issues: https://github.com/Typeforce-JS/is-value/issues
- npm.io page: https://npm.io/package/@typeforce/is-value

## Dependencies (2)

- [@typeforce/is-null](https://npm.io/package/@typeforce/is-null.md) ^1.0.2
- [@typeforce/is-undefined](https://npm.io/package/@typeforce/is-undefined.md) ^1.0.1

## 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.2 (latest) — 2018-02-12
- 1.0.1 — 2018-02-07
- 1.0.0 — 2018-01-26

## README

[license-shield-url]: https://img.shields.io/github/license/typeforce-js/is-value.svg?style=flat-square
[license-url]: https://github.com/Typeforce-JS/is-value/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@typeforce/is-value.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@typeforce/is-value.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@typeforce/is-value
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@typeforce/is-value/dist/index.min.js

# is-value

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is not `undefined` or `null`.

## Usage

```shell
    npm install @typeforce/is-value --save   # Install package via NPM
```

```javascript
    import { expect } from "chai";
    import isValue from "@typeforce/is-value";

    expect(isValue(({ x: 42 }).y)).to.be.true;
    expect(isValue(false)).to.be.true;
    expect(isValue(42)).to.be.true;

    expect(isValue(undefined)).to.be.false;
    expect(isValue(null)).to.be.false;
```

This package contains TypeScript type declarations.

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@typeforce/is-value/dist/index.min.js"></script>
    <script type="application/javascript">
        var x = "foo";
        if (isValue(x)) {
            // `x` is not null or undefined!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
```

```shell
    npm test       # Run tests.
```

## License

Refer to the `LICENSE` file for license information.

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