Methods
get(index) → {object}
Retrieves an object by its index
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | The index in the referenced objects array |
- Source:
Returns:
The referenced object
- Type
- object
has(value) → {Object}
Checks whether the given object is referenced (or, 'seen'). If not, then it's added. For every call, a 'cache' object is returned
Parameters:
| Name | Type | Description |
|---|---|---|
value |
object | The object to check if it's referenced or not |
- Source:
Returns:
The cache object; its index and if it's referenced or not
- Type
- Object
reset()
Resets the references
- Source:
set(value)
Sets an object to hold as a reference
Parameters:
| Name | Type | Description |
|---|---|---|
value |
object | The object to reference and mark as 'seen' |
- Source: