Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/westtrade/data-store
https://github.com/westtrade/data-store
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/westtrade/data-store
- Owner: westtrade
- Created: 2020-06-09T15:37:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T08:26:21.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T23:40:22.832Z (about 1 month ago)
- Language: JavaScript
- Size: 1.52 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# DataStore for svelte
## Example
```js
const DataStore = require('@westtrade/data-store')const someStore = new DataStore(() =>
fetch('http://some-api.js/api.json').then(res => res.json())
)someStore.sync()
module.exports = someStore
``````svelte
import someStore from './someStore'
{#if $someStore.loading}
Loading...
{: else}
{ JSON.stringify($someStore) }
{/if}
```