0.3.2 • Published 3 years ago

@roomservice/core v0.3.2

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

Core

This is the core logic for the browser, react, and node clients.

Interpretters

The Core exposes "interpreters" that are responsible for maintaining an object's state through commands.

Example: MapInterpreter

import { MapInterpreter } from '@roomservice/core';

// ~~ Create a new list! ~~
const {
  // The `mcreate` command responsible for creating this list
  cmd,
  // An in-memory representation of the list
  store,
  // Metadata associated with the list
  meta,
} = MapInterpreter.newList('doc', 'map');

// Apply incoming commands
MapInterpreter.applyCommand(store, ['mput', 'doc', 'map', 'key', 'value']);

// Run functions and get the resulting commands
const cmd = MapInterpreter.runSet(store, meta, 'dogs', 'cats');
0.3.3-0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.2.1

3 years ago

0.2.1-0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago