Checks if value is classified as a boolean primitive or Boolean object. Not the same as truthiness. Part of Lodash Lang since 0.1.0 (stable — not deprecated).
Pass the value you want to inspect or convert. Read the return type carefully before you use the result.
Syntax
Call _.isBoolean. Start with this line.
Lodash
_.isBoolean(value)
Call
What it does
_.isBoolean(value)
Primary signature.
Prefer import isBoolean from "lodash/isBoolean" when you want a smaller bundle.
Library declarations
Lodash
_.isBoolean(value)
Parameters
Parameter
Description
value
Required. The value to check
Return Value
Return Value
Description
*
true if boolean, else false
Lodash Examples
Example 1 — Official: false
The boolean primitive false is classified as a boolean.
String flags."false" is a string — parse it first.
Numbers.0 / 1 are numbers, not booleans.
Empty string. Falsy, but not boolean type.
Rule. Type check ≠ coercion / truthiness.
Compatibility
Browser & Runtime Support
_.isBoolean is a Lodash Lang helper (available since 0.1.0, stable in 4.x). It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash.
✓ Stable · Lodash 0.1.0+
_.isBoolean()
Available in [email protected] full builds and the lodash/isBoolean modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.isBooleanLodash 0.1.0+
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import isBoolean from "lodash/isBoolean" for smaller builds. For primitives only, typeof value === "boolean" is enough.
Frequently Asked Questions
_.isBoolean(value) returns true if value is classified as a boolean primitive (true/false) or a Boolean object (new Boolean(...)), otherwise false.
No. Many values are truthy or falsy without being booleans — 0, "", null. _.isBoolean only tests boolean type classification.
For primitives, yes. For boxed Booleans (new Boolean(...)), typeof returns "object" while _.isBoolean still returns true.
Rarely. Boxed booleans are surprising in conditionals (an object is always truthy). Prefer plain true/false literals.
Strings are never booleans. Parse or coerce API flags explicitly before treating them as booleans.
Use import isBoolean from "lodash/isBoolean" or require("lodash/isBoolean") for tree-shaking friendly bundles. Full build: import _ from "lodash" then _.isBoolean.