Socket
Socket
Sign inDemoInstall

immutable-crdt

Package Overview
Dependencies
1
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    immutable-crdt

A CRDT library that you can add to your existing codebase


Version published
Weekly downloads
24
Maintainers
1
Install size
204 kB
Created
Weekly downloads
 

Readme

Source

CRDT library for immutable apps. Here's a simple:

import {Document} from "immutable-crdt";

let person = {
  firstName: "a",
  lastName: "b"
};

const doc2 = Document.initialize(person);
const doc = Document.initialize(person);
const mutations = doc.updateState({...person, firstName: "blah", lastName: "blah"});

doc2.applyMutations(mutations);
console.log(doc2.getState()); // { firstName: "blah", lastName: "blah" }

TODOS:

  • remove ID check
  • history
  • cache mutations that
  • snapshotting state for performance
  • benchmark testing
  • persistence
  • conflict resolution
  • pubnub examples
  • prevent applied mutations from being

Caveats:

  • Diffing method doesn't work for certain scenarios such as incrementing

FAQs

Last updated on 03 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc