0.0.3 • Published 5 years ago

crdt.js v0.0.3

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

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.