# assert-function

> Assert that a value is a function

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

## Install

```sh
npm install assert-function
pnpm add assert-function
yarn add assert-function
bun add assert-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 | 2015-07-02 |
| First published | 2015-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | assert, function, error |

## Links

- npm: https://www.npmjs.com/package/assert-function
- Repository: https://github.com/bendrucker/assert-function
- Issues: https://github.com/bendrucker/assert-function/issues
- npm.io page: https://npm.io/package/assert-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) — 2015-07-02

## README

# assert-function [![Build Status](https://travis-ci.org/bendrucker/assert-function.svg?branch=master)](https://travis-ci.org/bendrucker/assert-function)

> Assert that a value is a function

## Install

```
$ npm install --save assert-function
```

## Usage

```js
var assertFunction = require('assert-function')

assertFunction(function () {})
//=> noop

assertFunction('foo')
// => TypeError: Expected function, got: foo
```

## API

#### `assertFunction(value)` -> `undefined`

##### value

*Required*  
Type: `any`

A value to check. A `TypeError` is throw for non-function values.

## License

MIT © [Ben Drucker](http://bendrucker.me)

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