Class: Map

utils.Map

new Map()

Map

Source:

Methods

get(key) → {Object|null}

Get item from map.

Parameters:
Name Type Description
key String
Source:
Returns:
Type
Object | null

has(key) → {Boolean}

Test whether map has an item.

Parameters:
Name Type Description
key String
Source:
Returns:
Type
Boolean

insert(key) → {Boolean}

Insert a key. Equivalent to this.set([key], true).

Parameters:
Name Type Description
key String
Source:
Returns:
Type
Boolean

keys() → {Array:.<String:>}

Get map keys.

Source:
Returns:
Type
Array:.<String:>

remove(key) → {Object|null}

Remove an item from map.

Parameters:
Name Type Description
key String
Source:
Returns:
Type
Object | null

reset()

Reset the map.

Source:

set(key, value) → {Boolean}

Set a key to value in map.

Parameters:
Name Type Description
key String
value Object
Source:
Returns:
Type
Boolean

values() → {Array:.<Object:>}

Get map values.

Source:
Returns:
Type
Array:.<Object:>