Socket
Socket
Sign inDemoInstall

is-ipfs

Package Overview
Dependencies
7
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.3

20

CHANGELOG.md

@@ -0,1 +1,21 @@

<a name="1.0.3"></a>
## [1.0.3](https://github.com/ipfs/is-ipfs/compare/v1.0.2...v1.0.3) (2020-04-22)
<a name="1.0.2"></a>
## [1.0.2](https://github.com/ipfs/is-ipfs/compare/v1.0.1...v1.0.2) (2020-04-22)
<a name="1.0.1"></a>
## [1.0.1](https://github.com/ipfs/is-ipfs/compare/v1.0.0...v1.0.1) (2020-04-22)
### Bug Fixes
* remove bs58 and add buffer ([#33](https://github.com/ipfs/is-ipfs/issues/33)) ([b711186](https://github.com/ipfs/is-ipfs/commit/b711186))
<a name="1.0.0"></a>

@@ -2,0 +22,0 @@ # [1.0.0](https://github.com/ipfs/is-ipfs/compare/v0.6.3...v1.0.0) (2020-04-05)

8

package.json
{
"name": "is-ipfs",
"version": "1.0.0",
"version": "1.0.3",
"description": "A set of utilities to help identify IPFS resources on the web",

@@ -44,3 +44,3 @@ "keywords": [

"dependencies": {
"bs58": "^4.0.1",
"buffer": "^5.6.0",
"cids": "~0.8.0",

@@ -55,2 +55,3 @@ "iso-url": "~0.4.7",

"aegir": "^21.4.5",
"bs58": "^4.0.1",
"chai": "^4.2.0",

@@ -73,4 +74,5 @@ "pre-commit": "^1.2.2"

"nginnever <ginneversource@gmail.com>",
"Henrique Dias <hacdias@gmail.com>"
"Henrique Dias <hacdias@gmail.com>",
"Hugo Dias <mail@hugodias.me>"
]
}
'use strict'
const base58 = require('bs58')
const { Buffer } = require('buffer')
const multihash = require('multihashes')

@@ -27,4 +27,3 @@ const multibase = require('multibase')

try {
const buffer = Buffer.from(base58.decode(formatted))
multihash.decode(buffer)
multihash.decode(multibase.decode('z' + formatted))
return true

@@ -138,3 +137,3 @@ } catch (e) {

if (Buffer.isBuffer(input)) {
return base58.encode(input)
return multibase.encode('base58btc', input).toString().slice(1)
}

@@ -141,0 +140,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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc