# is-fn

> Check if a value is a function

Latest version **3.0.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-05-03 |
| First published | 2015-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 29 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | function, fn, check, detect, is, test, type |

## Links

- npm: https://www.npmjs.com/package/is-fn
- Repository: https://github.com/sindresorhus/is-fn
- Homepage: https://github.com/sindresorhus/is-fn#readme
- Issues: https://github.com/sindresorhus/is-fn/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-fn

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

- 3.0.0 (latest) — 2021-05-03
- 2.0.0 — 2019-01-13
- 1.0.0 — 2015-08-30

## README

# is-fn

> Check if a value is a function

In Node.js, just use `typeof fn` which works exactly the same. This module can be useful in the browser where `typeof fn` has a myriad of [bugs](https://github.com/lodash/lodash/blob/8f621b38bfc67f64a9bf7af347e3398477790a39/lodash.js#L8171-L8173).

## Install

```
$ npm install is-fn
```

## Usage

```js
import isFunction from 'is-fn';

isFunction(() => {});
//=> true

isFunction('unicorn');
//=> false
```

## Related

- [@sindresorhus/is](https://github.com/sindresorhus/is) - Type check values

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