Returns true
if the given object
is a Boolean
. Otherwise, returns false
.
const util = require('util');
util.isBoolean(1);
// Returns: false
util.isBoolean(0);
// Returns: false
util.isBoolean(false);
// Returns: true
Since v4.0.0 - Use typeof value === 'boolean'
instead.
Generated using TypeDoc
Returns
true
if the givenobject
is aBoolean
. Otherwise, returnsfalse
.Deprecated
Since v4.0.0 - Use
typeof value === 'boolean'
instead.