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

@miniflare/r2

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@miniflare/r2 - npm Package Compare versions

Comparing version 2.10.0 to 2.11.0

22

dist/src/index.js

@@ -137,8 +137,14 @@ var __create = Object.create;

function parseHeaderArray(input) {
if (typeof input !== "string")
return;
if (!input.includes(","))
return input;
return input.split(",").map((x) => x.trim());
return stripQuotes(input);
return input.split(",").map((x) => stripQuotes(x));
}
function stripQuotes(input) {
input = input.trim();
if (input[0] === '"')
input = input.slice(1);
if (input[input.length - 1] === '"')
input = input.slice(0, -1);
return input;
}
function parseOnlyIf(onlyIf) {

@@ -157,11 +163,15 @@ if (onlyIf === void 0)

onlyIf.etagMatches = parseHeaderArray(onlyIf.etagMatches);
} else if (Array.isArray(onlyIf.etagMatches)) {
onlyIf.etagMatches = onlyIf.etagMatches.map((x) => stripQuotes(x));
}
if (typeof onlyIf.etagDoesNotMatch === "string") {
onlyIf.etagDoesNotMatch = parseHeaderArray(onlyIf.etagDoesNotMatch);
} else if (Array.isArray(onlyIf.etagDoesNotMatch)) {
onlyIf.etagDoesNotMatch = onlyIf.etagDoesNotMatch.map((x) => stripQuotes(x));
}
if (typeof onlyIf.uploadedBefore === "string") {
onlyIf.uploadedBefore = new Date(onlyIf.uploadedBefore);
onlyIf.uploadedBefore = new Date(stripQuotes(onlyIf.uploadedBefore));
}
if (typeof onlyIf.uploadedAfter === "string") {
onlyIf.uploadedAfter = new Date(onlyIf.uploadedAfter);
onlyIf.uploadedAfter = new Date(stripQuotes(onlyIf.uploadedAfter));
}

@@ -168,0 +178,0 @@ return onlyIf;

{
"name": "@miniflare/r2",
"version": "2.10.0",
"version": "2.11.0",
"description": "Workers R2 module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -38,8 +38,8 @@ "keywords": [

"dependencies": {
"@miniflare/shared": "2.10.0",
"@miniflare/shared": "2.11.0",
"undici": "5.9.1"
},
"devDependencies": {
"@miniflare/shared-test": "2.10.0"
"@miniflare/shared-test": "2.11.0"
}
}

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