crdt.js

0.0.3 • Public • Published

Conflict-free Replicated Data Types JavaScript Library

npm versionnodelast commit

Module library of CRDTs written in pure JavaScript

This module provides a set of Conflict-Free Replicated Data Types for your JavaScript programs. All CRDTs in this library, except G-Counter,are currently operation-based.

Current CRDTs

CRDTs accessible for your use throught this module to date.

CmRDTs

  • GSet: A grow only set
  • 2PSet: A two phase set that supports removing an element for ever
  • GCounter: A grow only counter
  • PNCounter: A counter supporting increment and decrement

CvRDTs

  • todo

Usage

const GCounter = require('crdts').GCounter
const PNCounter = require('crdts').PNCounter
const GSet = require('crdts').GSet
const TwoPSet = require('crdts').TwoPSet
const ORSet = require('crdts').ORSet
const LWWSet = require('crdts').LWWSet

// Or:
import { GSet, ORSet, LWWSet } from 'crdt.js'

Contributing

If you would like to contribute to the development of this library feel free to fork this repository and submit a Pull Request against the develop branch. New contributors to help create a faster growing library is very much so encouraged.

Issues

If you find an issue with the library please submit an issue so it can be taken care of immediately.

Package Sidebar

Install

npm i crdt.js

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

97.6 kB

Total Files

30

Last publish

Collaborators

  • xcesiv