Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

svelte-websocket-store

1.1.0 • Public • Published

Svelte v3 npm License minified size downloads Build Status semantic-release styled with prettier Commitizen friendly Known Vulnerabilities

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

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

Install

npm i svelte-websocket-store

DownloadsWeekly Downloads

27

Version

1.1.0

License

BSD-2-Clause

Unpacked Size

7.03 kB

Total Files

4

Last publish

Collaborators

  • avatar