See (Svelte's docs)[https://svelte.dev/docs#svelte_store] for details on the Store contract and subscribe
function.
Gets a derived store containing every entity in the store.
Array of all entities
Gets a derived store containing the entity if the ID is found, or undefined otherwise.
ID of the entity to find
Entity object if found, undefined otherwise
Gets a derived store containing a list of all entities found by ID. IDs that aren't found in the store are ignored. The list of entities is not guaranteed to be the same length as the list of IDs.
Array of IDs to find
Array of found entities
Gets a derived store containing a list of all entities in the store that match the filter function.
Filter function
Array of all entities matching the filter function
Removes the entity from the store, if found.
ID of the entity to remove
Removes the given entities from the store, if found.
Array of IDs to remove from the store
Removes an entity from the store, if found.
The entity to remove
Removes multiple entities from the store, if found.
Array of entities to remove
Removes all entities that match the filter function.
Filter function which returns true for each entity to be removed
Removes all entities from the store.
Adds the given entity to the store. If the entity is already in the store, their old value is replaced.
Entity to be added or updated
Adds the given entities to the store. For entities that are already in the store, their old value is replaced.
Entity or entities to be added or updated
Runs every entity through the updater function and stores the new state.
Callback to update the entity
If found, runs the entity through the updater function and stores the new state.
Callback to update the entity
ID of the entity to update
Runs the matching entity through the updater function and stores the new state.
Callback to update each entity
IDs of the entities to update
If found, runs the entity through the updater function and stores the new state.
Callback to update the entity
The entity to update
Runs each existing entity through the updater function and stores the new state.
Callback to update each entity
Array of the entities to update
Runs each matching entity through the updater function and stores the new state.
Callback to update each entity
Filter function that returns true for each entity to update
Creates a new entity store.
Entity type being stored
Function that returns the ID of an entity
(optional) Initial array of items to be stored
Generated using TypeDoc
Simple Svelte store that normalized data by ID and provides helpers for common data access patterns.