Extends
- Map
Methods
delete(key) → {Store.<Value>}
- Source:
Deletes a key from the Store
Parameters:
Name | Type | Description |
---|---|---|
key |
String |
Returns:
- Type
- Store.<Value>
filter(func) → {Array.<Class>}
- Source:
Return all objects that makes the function return true
Parameters:
Name | Type | Description |
---|---|---|
func |
function | A function that takes an object and returns true if it matches |
Returns:
- Type
- Array.<Class>
find(func) → (nullable) {Class}
- Source:
Filters the whole Store and returns the specified value if it matches the given Function
Parameters:
Name | Type | Description |
---|---|---|
func |
function | The function to test with |
Returns:
- Type
- Class
keyArray() → (nullable) {Array}
- Source:
Returns an array of keys from the Store
Returns:
- Type
- Array
map(func) → {Array}
- Source:
creates a new array with the results of calling a provided function on every element in the calling array.
Parameters:
Name | Type | Description |
---|---|---|
func |
function | The function to test with |
Returns:
- Type
- Array
random() → (nullable) {Class}
- Source:
Fetches a random value from the Store
Returns:
- Type
- Class
randomKeys() → (nullable) {Class}
- Source:
Fetches a random key from the Store
Returns:
- Type
- Class
set(key, value) → {Store.<Value>}
- Source:
Basically, this replaces Map.set()
since Map.set()
doesn't return the Map itself, while this does.
Parameters:
Name | Type | Description |
---|---|---|
key |
String | The key for the store |
value |
Any | The value of the key |
Returns:
- Type
- Store.<Value>
valueArray() → (nullable) {Array}
- Source:
Returns an array of values from the Store
Returns:
- Type
- Array