A memento represents a storage utility. It can store and retrieve values.
Methods
get<T>(key:String):Null<T>
get<T>(key:String, defaultValue:T):T
Return a value.
Parameters:
key | A string. |
|---|
Returns:
The stored value or undefined.
update(key:String, value:Any):Thenable<Void>
Store a value. The value must be JSON-stringifyable.
Note that using undefined as value removes the key from the underlying
storage.
Parameters:
key | A string. |
|---|---|
value | A value. MUST not contain cyclic references. |