Library.Storage
Do not use this directly, this Library needs to be implemented on a class.
Example
var myClassPrototype = new MAF.Class({
Implements: [
Library.Storage
]
});
var myClass = new myClassPrototype();
myClass.store('some_number', 123);
myClass.retrieve('some_number'); // Returns 123
myClass.eliminate('some_number');
Methods
eliminate(key)
Removes a key from the storage.
Parameters:
Name Type Description key String Deletes the value if key exists.
retrieve(key)
Retrieves a value from the storage.
Parameters:
Name Type Description key String Retrieves the value if key exists.
store(key, value)
Saves a value to be availeble on the instance this Library is placed.
Parameters:
Name Type Description key String Key needs to be string.
value Mixed Supports the storing of Strings, Numbers, Objects, Arrays. basically any JSONeable value.