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

htmx-router

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmx-router - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

1

cookies.d.ts

@@ -26,2 +26,3 @@ export interface CookieOptions {

set(name: string, value: string, options?: CookieOptions): void;
private string;
unset(name: string): void;

@@ -28,0 +29,0 @@ /** Creates the response headers required to make the changes done to these cookies */

47

cookies.js

@@ -51,5 +51,9 @@ /**

if (this.source !== null && typeof this.source === "object") {
document.cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;
document.cookie = this.string(name);
}
}
string(name) {
return encodeURIComponent(name) + "=" + encodeURIComponent(this.map[name]) + ";" + StringifyOptions(this.config[name]);
;
}
unset(name) {

@@ -62,24 +66,25 @@ this.parse();

const headers = new Array();
for (const name in this.config) {
let config = "";
for (const opt in this.config[name]) {
const prop = opt === "maxAge"
? "Max-Age"
: opt[0].toUpperCase() + opt.slice(1);
const raw = this.config[name][opt];
if (raw === true) {
config += `; ${prop}`;
continue;
}
if (raw === false)
continue;
let value = String(raw);
value = value[0].toUpperCase() + value.slice(1);
config += `; ${prop}=${value}`;
}
const cookie = encodeURIComponent(name) + "=" + encodeURIComponent(this.map[name]) + config + ";";
headers.push(cookie);
}
for (const name in this.config)
headers.push(this.string(name));
return headers;
}
}
function StringifyOptions(options) {
let config = "";
for (const opt in options) {
const prop = opt === "maxAge"
? "Max-Age"
: opt[0].toUpperCase() + opt.slice(1);
const raw = options[opt];
if (raw === true) {
config += `; ${prop}`;
continue;
}
if (raw === false)
continue;
let value = String(raw);
value = value[0].toUpperCase() + value.slice(1);
config += `${prop}=${value};`;
}
return config;
}
{
"name": "htmx-router",
"version": "1.0.6",
"version": "1.0.7",
"description": "A lightweight SSR framework with server+client islands",

@@ -5,0 +5,0 @@ "keywords": [

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