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

@edge-runtime/cookies

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@edge-runtime/cookies - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

6

dist/index.d.ts

@@ -140,3 +140,3 @@ // Type definitions for cookie 0.5

constructor(requestHeaders: Headers);
[Symbol.iterator](): IterableIterator<[string, string]>;
[Symbol.iterator](): IterableIterator<[string, RequestCookie]>;
/**

@@ -146,4 +146,4 @@ * The amount of cookies received from the client

get size(): number;
get(...args: [name: string] | [RequestCookie]): string | undefined;
getAll(...args: [name: string] | [RequestCookie] | []): [string, string][];
get(...args: [name: string] | [RequestCookie]): RequestCookie | undefined;
getAll(...args: [name: string] | [RequestCookie] | []): RequestCookie[];
has(name: string): boolean;

@@ -150,0 +150,0 @@ set(...args: [key: string, value: string] | [options: RequestCookie]): this;

@@ -128,3 +128,7 @@ "use strict";

const parsed = header ? parseCookieString(header) : /* @__PURE__ */ new Map();
return parsed;
const cached2 = /* @__PURE__ */ new Map();
for (const [name, value] of parsed) {
cached2.set(name, { name, value });
}
return cached2;
}));

@@ -147,6 +151,6 @@ __privateSet(this, _headers, requestHeaders);

if (!args.length) {
return all;
return all.map(([_, value]) => value);
}
const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
return all.filter(([n]) => n === name);
return all.filter(([n]) => n === name).map(([_, value]) => value);
}

@@ -159,6 +163,6 @@ has(name) {

const map = __privateMethod(this, _parsed, parsed_fn).call(this);
map.set(name, value);
map.set(name, { name, value });
__privateGet(this, _headers).set(
"cookie",
Array.from(map).map(([name2, value2]) => serialize({ name: name2, value: value2 })).join("; ")
Array.from(map).map(([_, value2]) => serialize(value2)).join("; ")
);

@@ -172,3 +176,3 @@ return this;

"cookie",
Array.from(map).map(([name, value]) => serialize({ name, value })).join("; ")
Array.from(map).map(([_, value]) => serialize(value)).join("; ")
);

@@ -175,0 +179,0 @@ return result;

@@ -5,3 +5,3 @@ {

"homepage": "https://edge-runtime.vercel.app/packages/cookies",
"version": "2.0.0",
"version": "2.0.1",
"main": "dist/index.js",

@@ -8,0 +8,0 @@ "module": "dist/index.mjs",

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