Add tslint (#151)
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
// of the ISC license. See the LICENSE file for details.
|
||||
|
||||
/**
|
||||
@name isFunction
|
||||
@signature isFunction (value: any): boolean
|
||||
@summary Tests for a `function`.
|
||||
@description
|
||||
Checks to see if the input value is a JavaScript function.
|
||||
@example
|
||||
import { isFunction } from '@polkadot/util';
|
||||
|
||||
console.log('isFunction', isFunction(() => false)); // => true
|
||||
*/
|
||||
* @name isFunction
|
||||
* @signature isFunction (value: any): boolean
|
||||
* @summary Tests for a `function`.
|
||||
* @description
|
||||
* Checks to see if the input value is a JavaScript function.
|
||||
* @example
|
||||
* import { isFunction } from '@polkadot/util';
|
||||
*
|
||||
* isFunction(() => false); // => true
|
||||
*/
|
||||
export default function isFunction (value: any): value is Function {
|
||||
return typeof value === 'function';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user