UNPKG

348 BJavaScriptView Raw
1/**
2 * @name isBoolean
3 * @summary Tests for a boolean value.
4 * @description
5 * Checks to see if the input value is a JavaScript boolean.
6 * @example
7 * <BR>
8 *
9 * ```javascript
10 * import { isBoolean } from '@polkadot/util';
11 *
12 * isBoolean(false); // => true
13 * ```
14 */
15export function isBoolean(value) {
16 return typeof value === 'boolean';
17}