@webdeveric/utils
    Preparing search index...

    Function assertIsInteger

    • Assert that input is an integer.

      Parameters

      • input: unknown
      • error: string | Error = 'input is not an integer'

      Returns asserts input is number

      assertIsInteger(42); // does not throw
      assertIsInteger(42.5); // throws TypeError: input is not an integer