UNPKG

@polkadot/util

Version:
22 lines (21 loc) 489 B
"use strict"; 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;