isObjectWith()function

isObjectWith(left: unknown, right: ImmutableObject): boolean
ParamType
leftunknown
The value to check. required
rightImmutableObject
The object whose props left must contain. required
Return
boolean
true if left is an object containing every prop of right.

Is unknown value left an object with every prop from right?

Examples

isObjectWith({ a: 1, b: 2 }, { a: 1 }) // true