crdt.js
Version:
Conflict-Free Replicated Data Types JavaScript Library
44 lines (28 loc) • 1.72 kB
Markdown
//img.shields.io/npm/v/crdt.js.svg)](https://www.npmjs.com/package/crdt.js)[](https://www.npmjs.com/package/crdt.js)[](https://github.com/xcesiv/crdt.js)
> 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.
> CRDTs accessible for your use throught this module to date.
* 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
* __todo__
```javascript
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'
```
If you would like to contribute to the development of this library feel free to fork this repository and submit a [Pull Request](https://github.com/xcesiv/crdt.js/pulls) against the [develop](https://github.com/xcesiv/crtd.js/tree/develop) branch. New contributors to help create a faster growing library is very much so encouraged.
If you find an issue with the library please submit an [issue](https://github.com/xcesiv/crtd.js/issues) so it can be taken care of immediately.
[![npm version](https: