# multi-typeof

> Check something against an array of types.

Latest version **1.0.0** (published 2015-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install multi-typeof
pnpm add multi-typeof
yarn add multi-typeof
bun add multi-typeof
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-07-16 |
| First published | 2015-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/multi-typeof) |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Andreas Gillström |
| Maintainers | gillstrom |
| Keywords | check, multi, multiple, test, type, typeof |

## Links

- npm: https://www.npmjs.com/package/multi-typeof
- Repository: https://github.com/gillstrom/multi-typeof
- Homepage: https://github.com/gillstrom/multi-typeof#readme
- Issues: https://github.com/gillstrom/multi-typeof/issues
- npm.io page: https://npm.io/package/multi-typeof

## 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

- 1.0.0 (latest) — 2015-07-16
- 0.1.0 — 2015-07-13
- 0.0.0 — 2015-07-09

## README

# multi-typeof [![Build Status](https://travis-ci.org/gillstrom/multi-typeof.svg?branch=master)](https://travis-ci.org/gillstrom/multi-typeof)

> Check something against an array of types.


## Install

```
$ npm install --save multi-typeof
```


## Example

```js
var multiTypeof = require('multi-typeof');

if (!multiTypeof(65, ['string', 'array'])) {
	throw new TypeError('Expected a string or an array');
}
```


## API

### multiTypeof(input, types)

#### input

*Required*  
Type: `Any type`

Value to test.

#### types

*Required*  
Type: `array`

Types to check against.


## License

MIT © [Andreas Gillström](http://github.com/gillstrom)

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