0.9.4 • Published 3 years ago

svelte-depot v0.9.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Depot for Svelte

CI

Repository pattern implementation connected to a writable store.

Install

npm i svelte-depot

Usage

Here is a basic CRUD example:

// src/stores/books.js
import depot from 'svelte-depot'

const books = depot()
const { store, add, save, remove, find } = books

export function createBook(title, author) {
    add({ title, author })
}

export function updateBook(book) {
    save(book)
}

export function deleteBook(book) {
    remove(book)
}

export function findBookByAuthor(author) {
    return find({ author })
}

export default store
0.9.4

3 years ago

0.9.3

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago