Returns true if map contains value under key, using comparer function. Use hasAnyValue if you don't care what key value might be under.
value
key
comparer
Having a comparer function is useful to check by value rather than object reference.
hasKeyValue(map,`hello`, `samantha`, (a, b) => a === b); Copy
hasKeyValue(map,`hello`, `samantha`, (a, b) => a === b);
Map to search
Key to search
Value to search
Function to determine match
True if key is found
Returns true if map contains
value
underkey
, usingcomparer
function. Use hasAnyValue if you don't care what key value might be under.Having a comparer function is useful to check by value rather than object reference.
Example: Find key value based on string equality