Methods
clear()
Remove all items from the list
- Source:
get(key) → {Object}
Return the item indexed by a key
Parameters:
Name | Type | Description |
---|---|---|
key |
String | The key of the item to retrieve |
- Source:
Returns:
The item stored at key
- Type
- Object
has(key) → {Boolean}
Test whether a key has been added to the index
Parameters:
Name | Type | Description |
---|---|---|
key |
String | The key to test |
- Source:
Returns:
Returns true if key is in the index, false if not
- Type
- Boolean
list() → {Array.<Object>}
Returns the list of items
- Source:
Returns:
The list of items
- Type
- Array.<Object>
push(key, item)
Add a new item into the list with a index key
Parameters:
Name | Type | Description |
---|---|---|
key |
String | Key used to look up item in index |
item |
Object | Item to be stored |
- Source:
remove(key) → {Boolean}
Remove the item indexed by key from the list
Parameters:
Name | Type | Description |
---|---|---|
key |
String | The key at which to remove the item |
- Source:
Returns:
Returns true if the key exists and an item was removed, returns false if no item was removed
- Type
- Boolean