UNPKG

489 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isFunction = void 0;
4/**
5 * @name isFunction
6 * @summary Tests for a `function`.
7 * @description
8 * Checks to see if the input value is a JavaScript function.
9 * @example
10 * <BR>
11 *
12 * ```javascript
13 * import { isFunction } from '@polkadot/util';
14 *
15 * isFunction(() => false); // => true
16 * ```
17 */
18function isFunction(value) {
19 return typeof value === 'function';
20}
21exports.isFunction = isFunction;