UNPKG

356 BJavaScriptView Raw
1/**
2 * @name isFunction
3 * @summary Tests for a `function`.
4 * @description
5 * Checks to see if the input value is a JavaScript function.
6 * @example
7 * <BR>
8 *
9 * ```javascript
10 * import { isFunction } from '@polkadot/util';
11 *
12 * isFunction(() => false); // => true
13 * ```
14 */
15export function isFunction(value) {
16 return typeof value === 'function';
17}
\No newline at end of file