isSubset
Import from @varavel/vdl-plugin-sdk/utils/arrays.
Checks if the subset array is entirely contained within the superset array.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
The type of elements contained in the arrays. |
Parameters
| Parameter | Type | Description |
|---|---|---|
superset |
readonly T[] |
The array that may contain all elements of the subset. |
subset |
readonly T[] |
The array to check against the superset. |
Returns
boolean
- Returns
trueif all elements of thesubsetare present in thesuperset, otherwise returnsfalse.