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

@threebow/axis

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@threebow/axis - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7

14

classes/routeGroup.js

@@ -80,2 +80,3 @@ const express = require("express"),

//Creating a route helper function
router.use((req, res, next) => {

@@ -89,2 +90,15 @@ let routeFn = (...args) => self.getNamedRoutePath(...args);

});
//Dumping the route names into the request's locals
router.use((req, res, next) => {
if(self.routeNameCache.size < 1) {
self.buildRouteNameCache();
}
let obj = {};
self.routeNameCache.forEach((v, k) => obj[k] = v);
res.locals.routeNameCache = obj;
next();
});
}

@@ -91,0 +105,0 @@

2

package.json
{
"name": "@threebow/axis",
"version": "1.1.6",
"version": "1.1.7",
"description": "An expressive web framework for node.js",

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

@@ -0,1 +1,3 @@

const pathToRegexp = require("path-to-regexp");
/*---------------------------------------------------------------------------

@@ -6,2 +8,12 @@ Make sure our route names always start with a slash internally

return str.startsWith("/") ? str : "/" + str;
};
module.exports.ResolveRoute = (name, params) => {
//Return the plain path if there are no arguments
let path = RouteList[name];
if(!params) return path;
//Compile the path with the given parameters if they are given
let compiled = pathToRegexp.compile(path);
return compiled(params);
};
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