UNPKG

@polkadot/util

Version:
21 lines (20 loc) 460 B
"use strict"; 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'; }