Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "crdts", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A CRDT Library for JavaScript", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"repository": { | ||
@@ -7,0 +7,0 @@ "type": "git", |
# CRDTs | ||
[![npm version](https://badge.fury.io/js/crdts.svg)](https://www.npmjs.com/package/crdts) | ||
[![CircleCI](https://circleci.com/gh/orbitdb/crdts.svg?style=shield)](https://circleci.com/gh/orbitdb/crdts) | ||
[![](https://img.shields.io/badge/freenode-%23orbitdb-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23orbitdb) | ||
A CRDT library for JavaScript. | ||
***WIP*** | ||
***Work In Progress*** | ||
This module provides a set of Conflict-Free Replicated Data Types for your JavaScript programs. All CRDTs in this library are currently operation-based. | ||
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. | ||
@@ -23,7 +27,10 @@ Implemented CRDTs: | ||
```javascript | ||
const GCounter = require('crdts/src/G-Counter') | ||
const GSet = require('crdts/src/G-Set') | ||
const TwoPSet = require('crdts/src/2P-Set') | ||
const ORSet = require('crdts/src/OR-Set') | ||
const LWWSet = require('crdts/src/LWW-Set') | ||
const GCounter = require('crdts').GCounter | ||
const GSet = require('crdts').GSet | ||
const TwoPSet = require('crdts').TwoPSet | ||
const ORSet = require('crdts').ORSet | ||
const LWWSet = require('crdts').LWWSet | ||
// Or: | ||
const { GSet, ORSet, LWWSet } = require('crdts') | ||
``` | ||
@@ -30,0 +37,0 @@ |
'use strict' | ||
const assert = require('assert') | ||
const TwoPSet = require('../src/2P-Set.js') | ||
const GSet = require('../src/G-Set.js') | ||
const { GSet, TwoPSet } = require('../src') | ||
@@ -7,0 +6,0 @@ describe('2P-Set', () => { |
@@ -5,7 +5,4 @@ 'use strict' | ||
const GCounter = require('../src/G-Counter.js') | ||
const GSet = require('../src/G-Set.js') | ||
const TwoPSet = require('../src/2P-Set.js') | ||
const ORSet = require('../src/OR-Set.js') | ||
const LWWSet = require('../src/LWW-Set.js') | ||
const CRDTs = require('../src') | ||
const { GCounter, GSet, TwoPSet, ORSet, LWWSet } = CRDTs | ||
@@ -12,0 +9,0 @@ const added = [1, 2, 3] |
@@ -5,7 +5,4 @@ 'use strict' | ||
const GCounter = require('../src/G-Counter.js') | ||
const GSet = require('../src/G-Set.js') | ||
const TwoPSet = require('../src/2P-Set.js') | ||
const ORSet = require('../src/OR-Set.js') | ||
const LWWSet = require('../src/LWW-Set.js') | ||
const CRDTs = require('../src') | ||
const { GCounter, GSet, TwoPSet, ORSet, LWWSet } = CRDTs | ||
@@ -12,0 +9,0 @@ const crdts = [ |
'use strict' | ||
const assert = require('assert') | ||
const Counter = require('../src/G-Counter.js') | ||
const Counter = require('../src').GCounter | ||
@@ -6,0 +6,0 @@ describe('G-Counter', () => { |
'use strict' | ||
const assert = require('assert') | ||
const GSet = require('../src/G-Set.js') | ||
const { GSet } = require('../src') | ||
@@ -6,0 +6,0 @@ describe('G-Set', () => { |
'use strict' | ||
const assert = require('assert') | ||
const LWWSet = require('../src/LWW-Set.js') | ||
const GSet = require('../src/G-Set.js') | ||
const { LWWSet, GSet } = require('../src') | ||
const LamportClock = require('./lamport-clock') | ||
@@ -7,0 +6,0 @@ |
'use strict' | ||
const assert = require('assert') | ||
const ORSet = require('../src/OR-Set.js') | ||
const GSet = require('../src/G-Set.js') | ||
const { ORSet, GSet } = require('../src') | ||
const LamportClock = require('./lamport-clock') | ||
@@ -7,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82171
21
2370
55