Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-ipfs

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-ipfs - npm Package Compare versions

Comparing version 1.0.3 to 2.0.0

17

CHANGELOG.md

@@ -0,1 +1,18 @@

<a name="2.0.0"></a>
# [2.0.0](https://github.com/ipfs/is-ipfs/compare/v1.0.3...v2.0.0) (2020-08-10)
### Bug Fixes
* replace node buffers with uint8arrays ([#34](https://github.com/ipfs/is-ipfs/issues/34)) ([ac5ec19](https://github.com/ipfs/is-ipfs/commit/ac5ec19))
### BREAKING CHANGES
* this module now only has deps that use Uint8Arrays and not Buffers
Co-authored-by: Marcin Rataj <lidel@lidel.org>
<a name="1.0.3"></a>

@@ -2,0 +19,0 @@ ## [1.0.3](https://github.com/ipfs/is-ipfs/compare/v1.0.2...v1.0.3) (2020-04-22)

2

dist/index.min.js.LICENSE.txt

@@ -7,1 +7,3 @@ /*!

*/
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

19

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

@@ -44,14 +44,12 @@ "keywords": [

"dependencies": {
"buffer": "^5.6.0",
"cids": "~0.8.0",
"cids": "^1.0.0",
"iso-url": "~0.4.7",
"mafmt": "^7.1.0",
"multiaddr": "^7.4.3",
"multibase": "~0.7.0",
"multihashes": "~0.4.19"
"mafmt": "^8.0.0",
"multiaddr": "^8.0.0",
"multibase": "^3.0.0",
"multihashes": "^3.0.1",
"uint8arrays": "^1.1.0"
},
"devDependencies": {
"aegir": "^21.4.5",
"bs58": "^4.0.1",
"chai": "^4.2.0",
"aegir": "^25.0.0",
"pre-commit": "^1.2.2"

@@ -73,2 +71,3 @@ },

"nginnever <ginneversource@gmail.com>",
"Alex Potsides <alex@achingbrain.net>",
"Henrique Dias <hacdias@gmail.com>",

@@ -75,0 +74,0 @@ "Hugo Dias <mail@hugodias.me>"

@@ -215,7 +215,7 @@ is-ipfs 🕵️

Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multiformats/js-multiaddr) or `Buffer` represents a valid multiaddr or `false` otherwise.
Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multiformats/js-multiaddr) or `Uint8Array` represents a valid multiaddr or `false` otherwise.
### `isIPFS.peerMultiaddr(addr)`
Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multiformats/js-multiaddr) or `Buffer` represents a valid "IPFS Peer" multiaddr (matching [`IPFS` format from `mafmt`](https://github.com/multiformats/js-mafmt#api)) or `false` otherwise.
Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multiformats/js-multiaddr) or `Uint8Array` represents a valid "IPFS Peer" multiaddr (matching [`IPFS` format from `mafmt`](https://github.com/multiformats/js-mafmt#api)) or `false` otherwise.

@@ -222,0 +222,0 @@ # License

'use strict'
const { Buffer } = require('buffer')
const multihash = require('multihashes')

@@ -10,2 +9,3 @@ const multibase = require('multibase')

const { URL } = require('iso-url')
const uint8ArrayToString = require('uint8arrays/to-string')

@@ -136,4 +136,4 @@ const pathGatewayPattern = /^https?:\/\/[^/]+\/(ip[fn]s)\/([^/?#]+)/

function convertToString (input) {
if (Buffer.isBuffer(input)) {
return multibase.encode('base58btc', input).toString().slice(1)
if (input instanceof Uint8Array) {
return uint8ArrayToString(input, 'base58btc')
}

@@ -140,0 +140,0 @@

Sorry, the diff of this file is too big to display

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