isObjectWith()function
isObjectWith(left: unknown, right: ImmutableObject): boolean
| Param | Type | |
|---|---|---|
left | unknown | The value to check. required |
right | ImmutableObject | 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