# i-s

> A module to check whether a JavaScript value is of a certain type

Latest version **1.2.3** (published 2014-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install i-s
pnpm add i-s
yarn add i-s
bun add i-s
```

## 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.2.3 |
| Published | 2014-10-22 |
| First published | 2014-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Radu Brehar |
| Maintainers | radubrehar |
| Keywords | test, is, validate, validation, value, function, check, type |

## Links

- npm: https://www.npmjs.com/package/i-s
- Repository: https://github.com/radubrehar/i-s
- Issues: https://github.com/radubrehar/i-s/issues
- npm.io page: https://npm.io/package/i-s

## 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.2.3 (latest) — 2014-10-22
- 1.2.2 — 2014-10-22
- 1.2.1 — 2014-09-02
- 1.2.0 — 2014-09-02
- 1.1.3 — 2014-09-02
- 1.1.2 — 2014-09-02
- 1.1.1 — 2014-09-02
- 1.1.0 — 2014-09-02
- 1.0.4 — 2014-09-02
- 1.0.3 — 2014-08-28
- 1.0.2 — 2014-08-18
- 1.0.1 — 2014-08-18
- 1.0.0 — 2014-08-18

## README

i-s
===

Checks whether a JavaScript valis is of a certain type


## Install

```sh
$ npm install i-s
```

## Usage

```js
var is = require('i-s')
```

## API

### numeric

```js
is.numeric('567') === true
is.numeric('a') === false
is.numeric(4) === true
```

### number

```js
is.number('567') === false
is.number('a') === false
is.number(4) === true
is.number(4.3) === true
```

### int

```js
is.int('567') === false
is.int('a') === false
is.int(4) === true
is.int(4.3) === false
```

### float

```js
is.number('567') === false
is.number('a') === false
is.number(4) === false
is.number(4.3) === true
```

### string

```js
is.string('abc') === true
```

### function

```js
function f(){}
is.function(f) === true
```

### object

```js
is.object({}) === true
```

### arguments

```js
is.arguments(function(){return arguments}()) === true
is.arguments([]) === false
```

### boolean

```js
is.boolean(true) === true
is.boolean(false) === true
is.boolean({}) === false
```

### date

```js
is.date(new Date()) === true
```

### regexp

```js
is.regexp(/a/) === true
is.regexp(new RegExp('/a/')) === true
```

### array

```js
is.array([]) === true
is.array(function(){ return arguments }()) === false
```

## Browser

For usage in browser, include ```dist/index.js```

## Tests

```sh
$ make
```

Watch mode:

```sh
$ make test-w
```

## License

MIT

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