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

@tinyhttp/app

Package Overview
Dependencies
Maintainers
1
Versions
305
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/app - npm Package Compare versions

Comparing version 1.3.6 to 1.3.7

8

dist/index.js

@@ -9,3 +9,3 @@ import { STATUS_CODES, createServer } from 'http';

import { getResponseHeader, setHeader, send, json, status, sendStatus, sendFile, setContentType, setLocationHeader, setLinksHeader, setVaryHeader, setCookie, clearCookie, formatResponse, redirect, attachment, download, append } from '@tinyhttp/res';
import rg from 'regexparam';
import { parse } from 'regexparam';

@@ -239,3 +239,3 @@ const trustRemoteAddress = ({ connection }) => {

if (fn instanceof App) {
regex = rg(path, true);
regex = parse(path, true);
fn.mountpath = path;

@@ -284,6 +284,6 @@ this.apps[path] = fn;

return this.middleware.filter((m) => {
m.regex = m.regex || rg(m.path, m.type === 'mw');
m.regex = m.regex || parse(m.path, m.type === 'mw');
let fullPathRegex;
m.fullPath && typeof m.fullPath === 'string'
? (fullPathRegex = rg(m.fullPath, m.type === 'mw'))
? (fullPathRegex = parse(m.fullPath, m.type === 'mw'))
: (fullPathRegex = null);

@@ -290,0 +290,0 @@ return m.regex.pattern.test(url) && (m.type === 'mw' && fullPathRegex ? fullPathRegex.pattern.test(url) : true);

{
"name": "@tinyhttp/app",
"version": "1.3.6",
"version": "1.3.7",
"description": "0-legacy, tiny & fast web framework as a replacement of Express",

@@ -49,3 +49,3 @@ "type": "module",

"@tinyhttp/router": "1.3.3",
"regexparam": "^1.3.0"
"regexparam": "^2.0.0"
},

@@ -52,0 +52,0 @@ "scripts": {

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