Members
objects
Returns the referenced 'seen' objects
- Source:
strings
Returns the referenced 'seen' strings
- Source:
traits
Returns the referenced 'seen' traits
- Source:
Methods
get(index, table) → {object|string}
Retrieves a referenced value by its index
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | The index in the referenced type's array table to look up |
table |
'strings' | 'objects' | 'traits' | The reference table type |
- Source:
Returns:
The referenced value
- Type
- object | string
has(value, table) → {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 |
table |
'strings' | 'objects' | 'traits' | The reference table type |
- Source:
Returns:
The cache object; its index and if it's referenced or not
- Type
- Object
reset()
Resets the references
- Source:
set(value, table)
Sets an object to hold as a reference
Parameters:
| Name | Type | Description |
|---|---|---|
value |
object | string | The value to reference and mark as 'seen' |
table |
'strings' | 'objects' | 'traits' | The reference table type |
- Source: