@polkadot/util
Version:
A collection of useful utilities for @polkadot
21 lines (20 loc) • 460 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFunction = isFunction;
/**
* @name isFunction
* @summary Tests for a `function`.
* @description
* Checks to see if the input value is a JavaScript function.
* @example
* <BR>
*
* ```javascript
* import { isFunction } from '@polkadot/util';
*
* isFunction(() => false); // => true
* ```
*/
function isFunction(value) {
return typeof value === 'function';
}
;