# error-if-not-function

> Function triggers error if argument is not type 'function'

Latest version **1.0.0** (published 2019-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-if-not-function
pnpm add error-if-not-function
yarn add error-if-not-function
bun add error-if-not-function
```

## 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.0.0 |
| Published | 2019-04-08 |
| First published | 2019-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | error, message, not, function, type-checking, type, check, data-type |

## Links

- npm: https://www.npmjs.com/package/error-if-not-function
- Repository: https://github.com/writetome51/error-if-not-function
- Homepage: https://github.com/writetome51/error-if-not-function#readme
- Issues: https://github.com/writetome51/error-if-not-function/issues
- npm.io page: https://npm.io/package/error-if-not-function

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-04-08

## README

# errorIfNotFunction(arg): void

Triggers error if `arg` is not a function.

## Example
```
errorIfNotFunction(false);
// Error: "Input must be function"
```

## Installation
`npm i  error-if-not-function`

## Loading
```ts
// if using TypeScript:
import { errorIfNotFunction } from 'error-if-not-function';
// if using ES5 JavaScript:
var errorIfNotFunction = require('error-if-not-function').errorIfNotFunction;
```

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