Methods
exists(key) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
key |
string | key whose mapping is to be checked in the map |
Returns:
whether the key has a mapping
- Type
- boolean
get(key, defaultSupplieropt) → {*|null}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
string | the key whose associated value is to be returned |
|
defaultSupplier |
function |
<optional> |
if the specified key is not already associated with a value, this function will return a default value |
Returns:
the current object for the supplied key, a default value if defaultSupplier is provided, or null
- Type
- * | null
put(key, value) → {*|null}
Parameters:
Name | Type | Description |
---|---|---|
key |
string | key with which the specified value is to be associated |
value |
* | value to be associated with the specified key |
Returns:
the previous value associated with the key, or null if there was no mapping for key
- Type
- * | null
remove(key) → {*|null}
- Description:
Removes the mapping for a key from this map if it is present.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
key |
string | key whose mapping is to be removed from the cache |
Returns:
the previous value associated with the key or null if there was no mapping for key
- Type
- * | null