isArrayWith()function
isArrayWith(left: unknown, right: T): left is ImmutableArray<T>
| Param | Type | |
|---|---|---|
left | unknown | The value to check and narrow. required |
right | T | The item the array must include. required |
| Return | |
|---|---|
left is ImmutableArray<T> | true if left is an array containing right. |
Is unknown value left an array that includes right?
Examples
isArrayWith([1, 2, 3], 2) // true