# is

> the definitive JavaScript type testing library

Latest version **3.3.2** (published 2025-07-19) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 43/100 (D)** — status: stable.

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

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.3.2 |
| Published | 2025-07-19 |
| First published | 2011-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/is) |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 0 |
| Unpacked size | 56.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 194 |
| Author | Enrico Marino |
| Maintainers | ljharb |
| Keywords | util, type, test |

## Links

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

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 3.3.2 (latest) — 2025-07-19
- 3.3.0 — 2018-12-14
- 3.2.1 — 2017-02-27
- 3.2.0 — 2016-10-25
- 3.1.0 — 2015-09-19
- 3.0.1 — 2015-02-22
- 2.2.1 — 2015-02-06
- 2.2.0 — 2014-11-29
- 2.1.0 — 2014-10-21
- 2.0.2 — 2014-10-05
- 2.0.1 — 2014-09-02
- 2.0.0 — 2014-08-26
- 1.1.0 — 2014-08-22
- 1.0.0 — 2014-08-07
- 0.3.0 — 2014-03-02
- … 16 more at https://npm.io/package/is/versions

## README

# is <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>

[![Build Status][travis-svg]][travis-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][npm-badge-png]][npm-url]

[![browser support][testling-png]][testling-url]

The definitive JavaScript type testing library

To be or not to be? This is the library!

## Installation

As a node.js module

```shell
$ npm install is
```

As a component
```shell
$ component install enricomarino/is
```

## API

### general

 - ``is.a`` (value, type) or ``is.type`` (value, type)
 - ``is.defined`` (value)
 - ``is.empty`` (value)
 - ``is.equal`` (value, other)
 - ``is.hosted`` (value, host)
 - ``is.instance`` (value, constructor)
 - ``is.instanceof`` (value, constructor) - deprecated, because in ES3 browsers, "instanceof" is a reserved word
 - ``is.nil`` (value)
 - ``is.null`` (value) - deprecated, because in ES3 browsers, "null" is a reserved word
 - ``is.undef`` (value)
 - ``is.undefined`` (value) - deprecated, because in ES3 browsers, "undefined" is a reserved word

### arguments

 - ``is.args`` (value)
 - ``is.arguments`` (value) - deprecated, because "arguments" is a reserved word
 - ``is.args.empty`` (value)

### array

 - ``is.array`` (value)
 - ``is.array.empty`` (value)
 - ``is.arraylike`` (value)

### boolean

 - ``is.bool`` (value)
 - ``is.boolean`` (value) - deprecated, because in ES3 browsers, "boolean" is a reserved word
 - ``is.false`` (value) - deprecated, because in ES3 browsers, "false" is a reserved word
 - ``is.true`` (value) - deprecated, because in ES3 browsers, "true" is a reserved word

### date

 - ``is.date`` (value)

### element

 - ``is.element`` (value)

### error

 - ``is.error`` (value)

### function

 - ``is.fn`` (value)
 - ``is.function`` (value) - deprecated, because in ES3 browsers, "function" is a reserved word

### number

 - ``is.number`` (value)
 - ``is.infinite`` (value)
 - ``is.decimal`` (value)
 - ``is.divisibleBy`` (value, n)
 - ``is.integer`` (value)
 - ``is.int`` (value) - deprecated, because in ES3 browsers, "int" is a reserved word
 - ``is.maximum`` (value, others)
 - ``is.minimum`` (value, others)
 - ``is.nan`` (value)
 - ``is.even`` (value)
 - ``is.odd`` (value)
 - ``is.ge`` (value, other)
 - ``is.gt`` (value, other)
 - ``is.le`` (value, other)
 - ``is.lt`` (value, other)
 - ``is.within`` (value, start, finish)

### object

 - ``is.object`` (value)

### regexp

 - ``is.regexp`` (value)

### string

 - ``is.string`` (value)

### encoded binary

 - ``is.base64`` (value)
 - ``is.hex`` (value)

### Symbols
 - ``is.symbol`` (value)

### BigInts
 - ``is.bigint`` (value)

## Contributors

- [Jordan Harband](https://github.com/ljharb)

[npm-url]: https://npmjs.org/package/is
[npm-version-svg]: http://versionbadg.es/enricomarino/is.svg
[travis-svg]: https://travis-ci.org/enricomarino/is.svg
[travis-url]: https://travis-ci.org/enricomarino/is
[deps-svg]: https://david-dm.org/enricomarino/is.svg
[deps-url]: https://david-dm.org/enricomarino/is
[dev-deps-svg]: https://david-dm.org/enricomarino/is/dev-status.svg
[dev-deps-url]: https://david-dm.org/enricomarino/is#info=devDependencies
[testling-png]: https://ci.testling.com/enricomarino/is.png
[testling-url]: https://ci.testling.com/enricomarino/is
[npm-badge-png]: https://nodei.co/npm/is.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/is.svg
[license-url]: LICENSE.md
[downloads-image]: http://img.shields.io/npm/dm/is.svg
[downloads-url]: http://npm-stat.com/charts.html?package=is

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