is-fn

Check if a value is a function

  • is-fn

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
is-fn
2703.0.03 years ago9 years agoMinified + gzip package size for is-fn in KB

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.

Install

$ npm install is-fn

Usage

import isFunction from 'is-fn';

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

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

Related