@webdeveric/utils
    Preparing search index...

    Function assertIsBoolean

    • Assert that input is a boolean.

      Parameters

      • input: unknown
      • error: string | Error = 'input is not a boolean'

      Returns asserts input is boolean

      assertIsBoolean(true); // does not throw
      assertIsBoolean('true'); // throws TypeError: input is not a boolean