multiformats
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -28,3 +28,7 @@ 'use strict' | ||
constructor (cid, ...args) { | ||
readonly(this, '_baseCache', new Map()) | ||
Object.defineProperty(this, '_baseCache', { | ||
value: new Map(), | ||
writable: false, | ||
enumerable: false | ||
}) | ||
if (_CID.isCID(cid)) { | ||
@@ -31,0 +35,0 @@ readonly(this, 'version', cid.version) |
{ | ||
"name": "multiformats", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Interface for multihash, multicodec, multibase and CID.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -215,4 +215,6 @@ /* globals before, describe, it */ | ||
test('works with deepEquals', () => { | ||
assert.deepStrictEqual(new CID(h1), new CID(h1)) | ||
assert.notDeepStrictEqual(new CID(h1), new CID(h2)) | ||
const ch1 = new CID(h1) | ||
ch1._baseCache.set('herp', 'derp') | ||
assert.deepStrictEqual(ch1, new CID(h1)) | ||
assert.notDeepStrictEqual(ch1, new CID(h2)) | ||
}) | ||
@@ -219,0 +221,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
56767
1501