npm.io
3.0.0 • Published 5 years ago

is-fn

Licence
MIT
Version
3.0.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
29

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.

Install

$ npm install is-fn

Usage

import isFunction from 'is-fn';

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

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

Keywords