YMap.YMap()

new YMap()

Implements:
  • IterableIterator

Extends

Methods

delete(key)

Remove a specified element from this YMap.

Parameters:
Name Type Description
key string

The key of the element to remove.

entries() → {IterableIterator.<T>}

Returns the value for each element in the YMap Type.

Returns:
IterableIterator.<T>

get(key) → {T|undefined}

Returns a specified element from this YMap.

Parameters:
Name Type Description
key string
Returns:
T | undefined

has(key) → {boolean}

Returns a boolean indicating whether the specified key exists or not.

Parameters:
Name Type Description
key string

The key to test.

Returns:
boolean

keys() → {Iterator.<string>}

Returns the keys for each element in the YMap Type.

Returns:
Iterator.<string>

set(key, value)

Adds or updates an element with a specified key and value.

Parameters:
Name Type Description
key string

The key of the element to add to this YMap

value T

The value of the element to add

Symbol.iterator() → {IterableIterator.<T>}

Returns:
IterableIterator.<T>

toJSON() → {Object.<string, T>}

Transforms this Shared Type to a JSON object.

Returns:
Object.<string, T>