Map

window. Map

new Map()

This class defines a limited polyfill for Map. If the browser supports Map, this class is not used.

Source:

Methods

delete(key) → {any}

Deletes a key (and value) from the Map.

Source:
Parameters:
Name Type Description
key String

The key to delete from the Map.

Returns:
Type:
any

value The value of the key is returned.

get(key) → {any}

Returns the value of the provided key.

Source:
Parameters:
Name Type Description
key String

The key to lookup.

Returns:
Type:
any

value The value of the provded key.

has(key) → {Boolean}

Determines whether the provided key is available in this Map.

Source:
Parameters:
Name Type Description
key String

The key to lookup.

Returns:
Type:
Boolean

value Whether the key is listed in this Map.

set(key, value)

Sets a value to a key in the Map.

Source:
Parameters:
Name Type Description
key String

The key to associate with the provided value.

value any

The value to be stored by the Map.