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

express-enrouten

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-enrouten - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

30

index.js

@@ -64,25 +64,17 @@ /*───────────────────────────────────────────────────────────────────────────*\

// Setup app locals for use in handlers.
// Do this way because app.locals has no prototype. One question this raises is,
// should an app be able to use enrouten multiple times, and if so, should
// app.locals.enrouten routes be merged?
// https://github.com/visionmedia/express/blob/6775658ed5cbac13f2d24c89e23ed967ad6a66ba/lib/application.js#L68
if (!Object.prototype.hasOwnProperty.call(parent.locals, 'enrouten')) {
Object.defineProperty(parent.locals, 'enrouten', {
value: {
parent.locals.enrouten = {
routes: router.routes,
routes: router.routes,
path: function path(name, data) {
var route;
route = this.routes[name];
if (typeof route === 'string') {
return reverend(route, data || {});
}
return undefined;
}
path: function path(name, data) {
var route;
route = this.routes[name];
if (typeof route === 'string') {
return reverend(route, data || {});
}
});
}
return undefined;
}
};
debug('mounting routes at', app.mountpath);

@@ -89,0 +81,0 @@ debug(router.routes);

@@ -50,3 +50,3 @@ 'use strict';

* @param router the express Router against which child routers are mounted
* @returns {Function} the implementation function to provide to directory
* @returns {Function} the implementation function to provide to direc`tory
*/

@@ -53,0 +53,0 @@ function createFileHandler(router) {

{
"name": "express-enrouten",
"version": "1.1.0",
"version": "1.1.1",
"description": "An express route initialization and configuration module.",

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

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