is-fn

3.0.0 • Public • Published

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

Related

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    19
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    19
  • 2.0.0
    8
  • 1.0.0
    89,086

Package Sidebar

Install

npm i is-fn

Weekly Downloads

89,113

Version

3.0.0

License

MIT

Unpacked Size

2.5 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus