@polkadot/util
Version:
A collection of useful utilities for @polkadot
22 lines (21 loc) • 489 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFunction = void 0;
/**
* @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';
}
exports.isFunction = isFunction;