Interface for classes with weakly referenced scoped variables.
Methods
-
delete(key)
-
Parameters:
Name Type Description key
* Reference key of scoped variable.
Returns:
successful - Is
true
if removed,false
if element does not exist.- Type
- boolean
-
get(key)
-
Parameters:
Name Type Description key
* Reference key of scoped variable.
Returns:
value - Scoped variable for the given key or
undefined
if none exists.- Type
- *
-
has(key)
-
Parameters:
Name Type Description key
* Reference key of scoped variable.
Returns:
exists - Instance contains a scoped variable for the given key.
- Type
- boolean
-
set(key, value)
-
Parameters:
Name Type Description key
* Reference key of scoped variable.
value
* Value of scoped variable to set.
Returns:
- Type
- this