@tabcat/orbit-db-set
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@tabcat/orbit-db-set", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "an orbit-db store as an ES6 Set", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -17,2 +17,6 @@ | ||
get () { | ||
return this._index | ||
} | ||
updateIndex (oplog, onProgressCallback) { | ||
@@ -19,0 +23,0 @@ const entries = oplog.values.slice().reverse() |
@@ -27,11 +27,14 @@ | ||
async add (value, { meta } = {}) { | ||
return this._addOperation({ op: opcodes.ADD, value, meta }) | ||
meta = meta ? { meta } : {} | ||
return this._addOperation({ op: opcodes.ADD, value, ...meta }) | ||
} | ||
async delete (value, { meta } = {}) { | ||
return this._addOperation({ op: opcodes.DELETE, value, meta }) | ||
meta = meta ? { meta } : {} | ||
return this._addOperation({ op: opcodes.DELETE, value, ...meta }) | ||
} | ||
async clear ({ meta } = {}) { | ||
return this._addOperation({ op: opcodes.CLEAR, meta }) | ||
meta = meta ? { meta } : {} | ||
return this._addOperation({ op: opcodes.CLEAR, ...meta }) | ||
} | ||
@@ -38,0 +41,0 @@ } |
4345
82