@polkadot/util
Version:
A collection of useful utilities for @polkadot
18 lines (17 loc) • 348 B
JavaScript
/**
* @name isBoolean
* @summary Tests for a boolean value.
* @description
* Checks to see if the input value is a JavaScript boolean.
* @example
* <BR>
*
* ```javascript
* import { isBoolean } from '@polkadot/util';
*
* isBoolean(false); // => true
* ```
*/
export function isBoolean(value) {
return typeof value === 'boolean';
}