Svelte Websocket Store

svelte store with a websocket backend
Alternatives To Svelte Websocket Store
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Svelte Websocket Store25922 days ago40August 19, 202212bsd-2-clauseJavaScript
svelte store with a websocket backend
Webim104
4 years agoPHP
基于laravel+swoole的在线聊天室
Mysql Notification84
9 months ago5gpl-3.0TypeScript
Example of a user defined function (UDF) in MySQL
General30
21 days agoPython
General is a web application development framework
Stimulus_reflex_table_filter9
3 years ago5mitRuby
Demo app showing how you can filter a table in a Ruby on Rails app with StimulusReflex
Howsyourday3
a year agomit
A social Media platform to share about your Day.
Ameritrade Interface3
2 years ago1mitPython
Ameritrade Python interface to handle Authentication, Websocket streaming subscriptions and API requests
Sportsball2
7 years agomitPHP
Sports realtime API delivered over websockets, created for Web Research unit
Reql Admin2
3 years agoJavaScript
A beautiful administration GUI for RethinkDB.
Erlstore2
5 years ago2mitErlang
Erlstore
Alternatives To Svelte Websocket Store
Select To Compare


Alternative Project Comparisons
Readme

Svelte v3 npm License bundlejs downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities Coverage Status Tested with TestCafe

svelte-websocket-store

Svelte store with a websocket backend

import websocketStore from "svelte-websocket-store";

const initialValue = { };
export const myStore = websocketStore("wss://mydomain.com/ws1", initialValue, ['option 1', 'option 2']);


// send JSON to websocket server
$myStore = { content: "to be saved", other_values: "all" };


// receive JSON from server (push)
let response = $myStore;

API

Table of Contents

websocketStore

Create a writable store based on a web-socket. Data is transferred as JSON. Keeps socket open (reopens if closed) as long as there are subscriptions.

Parameters

  • url string the WebSocket url
  • initialValue any store value used before 1st. response from server is present
  • socketOptions Array<string> transparently passed to the WebSocket constructor

Returns Store

install

With npm do:

npm install svelte-websocket-store

With yarn do:

yarn add svelte-websocket-store

run tests

export BROWSER=safari|chrome|...
npm|yarn test

license

BSD-2-Clause

Popular Websocket Projects
Popular Table Projects
Popular Networking Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Javascript
Table
Websocket