
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
@isoftdata/svelte-store-crud
Advanced tools
This is a Svelte store for tracking CRUD operations.
For example, if you have a map of entities and want to track when they are created, updated, and deleted without having to add a bunch of boolean flags to each entity, this store can help.
This store's value is an object containing three maps of objects, created, updated, and deleted.
npm i @isoftdata/svelte-store-crud
makeCrudStore function. Use the CrudRuneStore class insteadCrudRuneStore<T, K>const crudStore = new CrudRuneStore<Entity, 'id'>('id')
Creates a CRUD store for tracking changes to objects of type T, tracked by a key of type K.
This has the same API as the Svelte 4 version powered by Svelte stores, except for the subscribe function as it is not needed. Since it is written with runes, all fields and functions should be reactive if referenced in an effect.
Properties on the store are described below:
Add an entity to the created map.
Add an entity to the updated map.
If you call this function with an entity whose id is in the created map, it will update it in that map instead of adding it to the updated map.
Add an entity to the deleted map.
If you call this function with an entity whose id is in the created map, that entity will be removed from the created map, and will be put in the deleted map.
If you call this function with an entity whose id is in the updated map, it will be removed from the updated map and added to the deleted map.
Removes an entity from the deleted map.
This does not add it back to the created or updated map if it was in one before
Get a list of all values in the created map
Get a list of all values in the updated map
Get a list of all values in the deleted map
Get a list of all entries in the created map
Get a list of all entries in the updated map
Get a list of all entries in the deleted map
If entity is passed, returns true if that entity is created/updated deleted. Otherwise, returns true if there are any entity changes in the store
Returns true if the passed entity is in the created map
Returns true if the passed entity is in the updated map
Returns true if the passed entity is in the deleted map
Returns the entity if it is in the created map
Returns the entity if it is in the updated map
Returns the entity if it is in the deleted map
Clear the created, updated, and deleted maps. Or, if specified, clear just one.
import { CrudRuneStore } from '@isoftdata/svelte-store-crud'
type Entity = {
id: string
name: string
}
const crudStore = new CrudRuneStore<Entity, 'id'>('id')
// Create an entity with id = '1'
crudStore.create({
id: '1',
name: 'Entity 1'
})
// Update an entity with id = '1'
crudStore.update({
id: '1',
name: 'Entity 1 Updated'
})
// Delete an entity with id = '1'
crudStore.delete({
id: '1',
name: 'Entity 1 Updated'
})
// In a Svelte file, get the values reactively whenever the store is updated
$inspect(crudStore.createdValues)
$inspect(crudStore.updatedValues)
$inspect(crudStore.deletedValues)
$inspect(crudStore.hasChanges())
newCrudMapCreates the map used internally in the CRUD store, but without all the store logic
doCrudDoes all the logic of adding, removing, and updating things in a "CRUD map" without all the store logic
FAQs
This is a Svelte store for tracking CRUD operations.
We found that @isoftdata/svelte-store-crud demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.