Narrows an unknown value to an object if it is type-compatible and tests positively with isPlainObject, or raises an error otherwise.
unknown
object
The value to test.
Optional
The error message to use if value is not type-compatible.
value
AssertionFailedError If the value was undefined.
Narrows an
unknown
value to anobject
if it is type-compatible and tests positively with isPlainObject, or raises an error otherwise.