New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ipfs-unixfs-importer

Package Overview
Dependencies
Maintainers
3
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-unixfs-importer - npm Package Compare versions

Comparing version 15.1.6 to 15.1.7

8

dist/src/chunker/rabin.js

@@ -35,4 +35,8 @@ import errcode from 'err-code';

}
if (options.avgChunkSize == null && options.minChunkSize == null && options.maxChunkSize == null) {
throw errcode(new Error('please specify an average chunk size'), 'ERR_INVALID_AVG_CHUNK_SIZE');
const isInvalidChunkSizes = [min, avg, max].some((size) => size == null || isNaN(size));
if (isInvalidChunkSizes) {
if (options.avgChunkSize != null) {
throw errcode(new Error('please specify a valid average chunk size number'), 'ERR_INVALID_AVG_CHUNK_SIZE');
}
throw errcode(new Error('please specify valid numbers for (min|max|avg)ChunkSize'), 'ERR_INVALID_CHUNK_SIZE');
}

@@ -39,0 +43,0 @@ // validate min/max/avg in the same way as go

{
"name": "ipfs-unixfs-importer",
"version": "15.1.6",
"version": "15.1.7",
"description": "JavaScript implementation of the UnixFs importer used by IPFS",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

@@ -53,4 +53,10 @@ import errcode from 'err-code'

if (options.avgChunkSize == null && options.minChunkSize == null && options.maxChunkSize == null) {
throw errcode(new Error('please specify an average chunk size'), 'ERR_INVALID_AVG_CHUNK_SIZE')
const isInvalidChunkSizes = [min, avg, max].some((size) => size == null || isNaN(size))
if (isInvalidChunkSizes) {
if (options.avgChunkSize != null) {
throw errcode(new Error('please specify a valid average chunk size number'), 'ERR_INVALID_AVG_CHUNK_SIZE')
}
throw errcode(new Error('please specify valid numbers for (min|max|avg)ChunkSize'), 'ERR_INVALID_CHUNK_SIZE')
}

@@ -57,0 +63,0 @@

Sorry, the diff of this file is not supported yet

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