MapProxy

A data structure similar to a normal Map which accesses its data through API
commands to the Lucid app. This structure is iterable with for...of.

Extended by

Type parameters

Type parameter
KEY
VALUE

Constructors

new MapProxy()

new MapProxy<KEY, VALUE>(getKeys, getItem): MapProxy<KEY, VALUE>

Parameters

ParameterType
getKeys() => KEY[]
getItem(key) => VALUE

Returns

MapProxy<KEY, VALUE>


Accessors

size

get size(): number

Returns

number


Methods

filter()

filter(filter): VALUE[]

Parameters

ParameterType
filter(item, key) => boolean

Returns

VALUE[]


find()

find(filter): undefined | VALUE

Parameters

ParameterType
filter(item, key) => boolean

Returns

undefined | VALUE


first()

first(): undefined | VALUE

Returns

undefined | VALUE


get()

get(key): VALUE

Parameters

ParameterType
keyKEY

Returns

VALUE


keys()

keys(): KEY[]

Returns

KEY[]


map()

map<T>(callback): T[]

Type parameters

Type parameter
T

Parameters

ParameterType
callback(item, key) => T

Returns

T[]


values()

values(): Generator<VALUE & null | object, void, unknown>

Returns

Generator<VALUE & null | object, void, unknown>