pub fn has_key<K, V>(map: &HashMap<K, V>, key: &K) -> boolExpand description
Checks if a map contains a specific key.
§Arguments
map- The map to check for the keykey- The key to check for in the map
§Returns
bool-trueif the key is present in the map,falseotherwise
§Examples
use lowdash::has_key;
use std::collections::HashMap;
let mut map = HashMap::new();
map.insert("a", 1);
map.insert("b", 2);
assert!(has_key(&map, &"a"));
assert!(!has_key(&map, &"c"));