Function isObject

  • Asserts that the value is an object.

    Parameters

    • val: unknown

      Value to check

    • OptionalerrorOrMessage: string | Error

      Error object or message to throw if the value is not a string

    Returns asserts val is object