Function isBoolean

Determines if a value is a boolean.

isBoolean(true); // => true
isBoolean(false); // => true
isBoolean('abc'); // => false
  • Parameters

    • x: unknown

      The value to check.

    Returns x is boolean

    A boolean indicating whether the value is a boolean or not.