Socket
Socket
Sign inDemoInstall

cids

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cids - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

appveyor.yml

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="0.5.3"></a>
## [0.5.3](https://github.com/ipld/js-cid/compare/v0.5.2...v0.5.3) (2018-03-12)
### Bug Fixes
* [#39](https://github.com/ipld/js-cid/issues/39) - Improve constructor performance ([#45](https://github.com/ipld/js-cid/issues/45)) ([dc0bfd3](https://github.com/ipld/js-cid/commit/dc0bfd3))
<a name="0.5.2"></a>

@@ -2,0 +12,0 @@ ## [0.5.2](https://github.com/ipld/js-cid/compare/v0.5.1...v0.5.2) (2017-10-06)

16

package.json
{
"name": "cids",
"version": "0.5.2",
"version": "0.5.3",
"description": "CID Implementation in JavaScript",

@@ -38,11 +38,12 @@ "main": "src/index.js",

"dependencies": {
"multibase": "~0.3.4",
"multicodec": "~0.2.3",
"multihashes": "~0.4.9"
"multibase": "~0.4.0",
"multicodec": "~0.2.6",
"multihashes": "~0.4.13"
},
"devDependencies": {
"aegir": "^12.0.8",
"aegir": "^13.0.6",
"chai": "^4.1.2",
"dirty-chai": "^2.0.1",
"multihashing-async": "~0.4.6",
"multihashing": "^0.3.2",
"multihashing-async": "^0.4.8",
"pre-commit": "^1.2.2"

@@ -59,3 +60,6 @@ },

"Mitar <mitar.github@tnode.com>",
"Real Harry <sidewaybot@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"Victor Bjelkholm <victorbjelkholm@gmail.com>",
"Volker Mische <volker.mische@gmail.com>",
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",

@@ -62,0 +66,0 @@ "kumavis <kumavis@users.noreply.github.com>"

@@ -24,11 +24,2 @@ # js-cid

- [API](#api)
- [`new CID(version, codec, hash])`](#new-cidcodec-version-hash)
- [`.codec`](#codec)
- [`.version`](#version)
- [`.multihash`](#multihash)
- [`.buffer`](#buffer)
- [`.toBaseEncodedString(base)`](#tostring)
- [`.toJSON()`](#tojson)
- [`CID.isCID(other)`](#cidiscidother)
- [`CID.codecs`](#cidcodecs)
- [Contribute](#contribute)

@@ -35,0 +26,0 @@ - [License](#license)

@@ -9,2 +9,3 @@ 'use strict'

const multihash = require('multihashes')
const CIDUtil = require('./cid-util')

@@ -222,9 +223,3 @@ /**

static isCID (other) {
try {
CID.validateCID(other)
} catch (err) {
return false
}
return true
return !(CIDUtil.checkCIDComponents(other))
}

@@ -240,19 +235,6 @@

static validateCID (other) {
if (other == null) {
throw new Error('null values are not valid CIDs')
let errorMsg = CIDUtil.checkCIDComponents(other)
if (errorMsg) {
throw new Error(errorMsg)
}
if (!(other.version === 0 || other.version === 1)) {
throw new Error('Invalid version, must be a number equal to 1 or 0')
}
if (typeof other.codec !== 'string') {
throw new Error('codec must be string')
}
if (!Buffer.isBuffer(other.multihash)) {
throw new Error('multihash must be a Buffer')
}
mh.validate(other.multihash)
}

@@ -259,0 +241,0 @@ }

Sorry, the diff of this file is not supported yet

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 too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc