101
Version:
common javascript utils that can be required selectively that assume es5+
15 lines (13 loc) • 329 B
JavaScript
/**
* @module 101/is-function
*/
/**
* Functional version of val typeof 'function'
* @function module:101/is-function
* @param {*} val - value checked to be a function
* @return {boolean} Whether the value is a function or not
*/
module.exports = isFunction;
function isFunction (v) {
return typeof v === 'function';
}