hasValue
Import from @varavel/vdl-plugin-sdk/utils/maps.
Checks if a Map contains a specific value.
This function iterates through all values in the Map and checks if any value is equal to the search element using SameValueZero comparison (similar to Array.prototype.includes). This means that NaN is considered equal to NaN.
Type Parameters
| Type Parameter | Description |
|---|---|
K |
The type of keys in the Map. |
V |
The type of values in the Map. |
Parameters
| Parameter | Type | Description |
|---|---|---|
map |
Map\<K, V> |
The Map to search. |
searchElement |
V |
The value to search for. |
Returns
boolean
true if the Map contains the value, false otherwise.