1-liners
Version:
Useful oneliners and shorthand functions
26 lines (23 loc) • 494 B
JavaScript
/**
* @module 1-liners/isFunction
*
* @description
*
* Same as `typeof value === 'function'`.
*
* @example
*
* const isFunction = require('1-liners/isFunction');
*
* isFunction(function() {}); // => true
* isFunction(function named() {}); // => true
*
* isFunction('any other value'); // => false
*
*/
;
exports.__esModule = true;
exports['default'] = function (value) {
return typeof value === 'function';
};
module.exports = exports['default'];