Skip to content

Module: core::DataStorage

Jovan Gerodetti edited this page Jul 3, 2018 · 4 revisions

DataStorage

exported: default
kind: object
declaration: const

Properties

🚫 _value

Type: *
kind: value

🚫 _filledCallbacks

Type: Array.<Function>
kind: value

value

Type: *
kind: value

__proto__

Type: EventTarget
kind: value

Methods

constructor() => {DataStorage}

kind: function

fill(value) => {undefined}

kind: function

stores a value inside the DataStorage and triggers callbacks.

Name Type Description
value * any value can be stored

when(callback) => {undefined}

Type: ?
kind: function

Registers a callback which is executed everytime a value is filled into the DataStorage. If the DataStorage is already filled at the point of callback registration, the callback is invoced.

Name Type Description
callback Function

once(callback) => {undefined}

Type: ?
kind: function

Registers a one time callback which is executed as soon as the DataStorage has been filled.

Name Type Description
callback Function

whenNext(callback) => {undefined}

Type: ?
kind: function

Registers a one time callback for the next time the DataStorage is filled. This is usefull when waiting for an update.

Name Type Description
callback Function

Clone this wiki locally