mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Cleanup
This commit is contained in:
@@ -8,4 +8,4 @@ const ItemTypes = {
|
||||
Link: "link"
|
||||
};
|
||||
|
||||
module.exports = ItemTypes;
|
||||
module.exports = ItemTypes;
|
||||
|
||||
@@ -61,7 +61,7 @@ class List {
|
||||
seq: this.seq,
|
||||
ver: this.ver,
|
||||
items: this._currentBatch.map((f) => f.asJson)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* Static methods */
|
||||
|
||||
@@ -18,16 +18,16 @@ class Node {
|
||||
}
|
||||
|
||||
get asJson() {
|
||||
return { id: this.id, seq: this.seq, ver: this.ver, data: this.data, next: this.next }
|
||||
return { id: this.id, seq: this.seq, ver: this.ver, data: this.data, next: this.next };
|
||||
}
|
||||
|
||||
static equals(a, b) {
|
||||
return a.id == b.id && a.seq == b.seq && a.ver == b.ver;
|
||||
return a.id === b.id && a.seq === b.seq && a.ver === b.ver;
|
||||
}
|
||||
|
||||
hasChild(a) {
|
||||
const id = a.compactId;
|
||||
for(let i = 0; i < this.next.length; i ++) {
|
||||
for(let i = 0; i < this.next.length; i++) {
|
||||
if(this.next[i] === id)
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user