@tabcat/orbit-db-set
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@tabcat/orbit-db-set", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "an orbit-db store as an ES6 Set", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -8,2 +8,4 @@ | ||
const valueUndefinedYes = () => new Error('cannot add undefined to set') | ||
const type = 'set' | ||
@@ -28,2 +30,3 @@ | ||
async add (value, { meta } = {}) { | ||
if (value === undefined) throw valueUndefinedYes() | ||
meta = meta ? { meta } : {} | ||
@@ -34,2 +37,3 @@ return this._addOperation({ op: opcodes.ADD, value, ...meta }) | ||
async delete (value, { meta } = {}) { | ||
if (value === undefined) throw valueUndefinedYes() | ||
meta = meta ? { meta } : {} | ||
@@ -36,0 +40,0 @@ return this._addOperation({ op: opcodes.DELETE, value, ...meta }) |
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
4529
85