1.2.0 • Published 6 years ago

deepstream-signed-record v1.2.0

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

Deepstream Signed Record

Usage

import NodeRSA from 'node-rsa';
import deepstream from 'deepstream.io-client-js';
import signedRecord from 'deepstream-signed-record';

const client = deepstream("127.0.0.1:6020").login();

const run = async () => {
  const keyPair = new NodeRSA({ b: 1024 })
  // Optional default value
  const defaultValue = {
    example: "example"
  };
  const record = signedRecord(client, "example-record-name", keyPair, defaultValue);
  record.subscribe("example-record-name", (value) => {
    console.log(value);
  });
  await record.set("example-record-name", "example-record-value");
  await record.discard();
}

run();
1.2.0

6 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago