Comparing version 0.7.0 to 0.7.1
@@ -0,1 +1,11 @@ | ||
<a name="0.7.1"></a> | ||
## [0.7.1](https://github.com/multiformats/js-cid/compare/v0.7.0...v0.7.1) (2019-05-14) | ||
### Bug Fixes | ||
* create new CID from old CID ([c888183](https://github.com/multiformats/js-cid/commit/c888183)) | ||
<a name="0.7.0"></a> | ||
@@ -2,0 +12,0 @@ # [0.7.0](https://github.com/multiformats/js-cid/compare/v0.6.0...v0.7.0) (2019-05-09) |
{ | ||
"name": "cids", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "CID Implementation in JavaScript", | ||
@@ -5,0 +5,0 @@ "leadMaintainer": "Volker Mische <volker.mische@gmail.com>", |
@@ -63,3 +63,3 @@ 'use strict' | ||
constructor (version, codec, multihash, multibaseName) { | ||
if (module.exports.isCID(version)) { | ||
if (_CID.isCID(version)) { | ||
// version is an exising CID instance | ||
@@ -70,3 +70,4 @@ const cid = version | ||
this.multihash = Buffer.from(cid.multihash) | ||
this.multibaseName = cid.multibaseName | ||
// Default guard for when a CID < 0.7 is passed with no multibaseName | ||
this.multibaseName = cid.multibaseName || (cid.version === 0 ? 'base58btc' : 'base32') | ||
return | ||
@@ -73,0 +74,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
803671
6108