mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-11-23 22:39:55 +00:00
- Fixed internal @polkadot references to @pezkuwi - Updated hw-ledger and hw-ledger-transports packages - Updated keyring and networks packages - Version 14.0.7
24 lines
563 B
TypeScript
24 lines
563 B
TypeScript
// Copyright 2017-2025 @pezkuwi/util authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
type FnType = Function;
|
|
|
|
/**
|
|
* @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 '@pezkuwi/util';
|
|
*
|
|
* isFunction(() => false); // => true
|
|
* ```
|
|
*/
|
|
export function isFunction (value: unknown): value is FnType {
|
|
return typeof value === 'function';
|
|
}
|