Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 615 Bytes

File metadata and controls

39 lines (28 loc) · 615 Bytes

isFunction

Test if a value is a function.

Usage

var isFunction = require( '@stdlib/utils/is-function' );

isFunction( value )

Tests if a value is a function.

var value = function beep(){};

var bool = isFunction( value );
// returns true

Examples

var isFunction = require( '@stdlib/utils/is-function' );

console.log( isFunction( function foo(){} ) );
// returns true

console.log( isFunction( {} ) );
// returns false