@daaku/kombat
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -19,2 +19,3 @@ export declare class Timestamp { | ||
static fromJSON(data: any): Merkle; | ||
clone(): Merkle; | ||
private get childKeys(); | ||
@@ -21,0 +22,0 @@ insert(ts: Timestamp): void; |
@@ -96,2 +96,8 @@ "use strict"; | ||
} | ||
// Clone the Merkle. | ||
clone() { | ||
const children = {}; | ||
Object.keys(this.children).forEach((k) => (children[k] = this.children[k].clone())); | ||
return new Merkle(this.hash, children); | ||
} | ||
get childKeys() { | ||
@@ -290,3 +296,3 @@ return Object.keys(this.children); | ||
nodeID: this.clock.timestamp.nodeID, | ||
merkle: this.clock.merkle, | ||
merkle: this.clock.merkle.clone(), | ||
messages: toSend, | ||
@@ -293,0 +299,0 @@ }); |
{ | ||
"name": "@daaku/kombat", | ||
"author": "Naitik Shah <n@daaku.org>", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Infrastructure for CRDT powered applications.", | ||
@@ -16,3 +16,4 @@ "repository": "git@github.com:daaku/kombat", | ||
"build": "run-p check:lint test build:*", | ||
"test": "jest --modulePathIgnorePatterns 'lib/'" | ||
"test": "jest --modulePathIgnorePatterns 'lib/'", | ||
"deploy": "npm run build && npm publish --access=public" | ||
}, | ||
@@ -19,0 +20,0 @@ "jest": { |
Sorry, the diff of this file is not supported yet
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
40307
577