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

grandjs

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grandjs - npm Package Compare versions

Comparing version 2.2.25 to 2.2.26

tsc

2

lib/MiddleWare.js

@@ -34,5 +34,3 @@ "use strict";

else {
// matchedClass.serveFiles(() => {
return allMiddleWares[nexted](req, res, next);
// });
}

@@ -39,0 +37,0 @@ }

@@ -73,3 +73,4 @@ "use strict";

this.globalMiddleWares = this.globalMiddleWares || [];
path = `${this.base}/${path}`.replace(/(https?:\/\/)|(\/)+/g, "$1$2");
path = `${this.base}/${path}`.replace(/(https?:\/\/)|(\/)+/g, "$1$2").replace(/^(.+?)\/*?$/, "$1")
.replace(/\s+/gi, "");
const pattern = new url_pattern_1.default(path);

@@ -79,3 +80,6 @@ const applyMiddleWares = (comingMiddleWares) => {

const middleWare = (req, res, next) => {
// console.log('yes checking middleWare');
// console.log(pattern, req.pathname);
if (pattern.match(req.pathname)) {
// console.log('matched');
func(req, res, next);

@@ -82,0 +86,0 @@ }

{
"name": "grandjs",
"version": "2.2.25",
"version": "2.2.26",
"description": "A backend framework for solid web apps based on node.js",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -47,3 +47,2 @@ /**

} else {
// matchedClass.serveFiles(() => {
return allMiddleWares[nexted](

@@ -54,3 +53,2 @@ req,

);
// });
}

@@ -57,0 +55,0 @@ }

@@ -73,3 +73,4 @@ /**

this.globalMiddleWares = this.globalMiddleWares || [];
path = `${this.base}/${path}`.replace(/(https?:\/\/)|(\/)+/g, "$1$2");
path = `${this.base}/${path}`.replace(/(https?:\/\/)|(\/)+/g, "$1$2").replace(/^(.+?)\/*?$/, "$1")
.replace(/\s+/gi, "");
const pattern = new RouteParser(path);

@@ -79,3 +80,6 @@ const applyMiddleWares = (comingMiddleWares: MiddleWareInterface[]) => {

const middleWare = (req: Request, res: Response, next: Function) => {
// console.log('yes checking middleWare');
// console.log(pattern, req.pathname);
if (pattern.match(req.pathname)) {
// console.log('matched');
func(req, res, next);

@@ -82,0 +86,0 @@ } else {

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