Skip to main content
isBoolean - node__util.d.ts - Node documentation
function isBoolean

Usage in Deno

```typescript import { isBoolean } from "node:node__util.d.ts"; ```
isBoolean(object: unknown): object is boolean
Deprecated
Since v4.0.0 - Use `typeof value === 'boolean'` instead.
Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. ```js import util from 'node:util'; util.isBoolean(1); // Returns: false util.isBoolean(0); // Returns: false util.isBoolean(false); // Returns: true ```

Parameters

object: unknown

Return Type

object is boolean