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

director

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

director - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

test/server/http/insert-test.js

12

lib/director/router.js

@@ -404,5 +404,7 @@ /*

// Remember to ignore keys (i.e. values of `r`) which
// are actual methods (e.g. `on`, `before`, etc).
// are actual methods (e.g. `on`, `before`, etc), but
// which are not actual nested route (i.e. JSON literals).
//
if (routes.hasOwnProperty(r) && !this._methods[r]) {
if (routes.hasOwnProperty(r) && (!this._methods[r] ||
this._methods[r] && typeof routes[r] === 'object' && !Array.isArray(routes[r]))) {
//

@@ -598,3 +600,7 @@ // Attempt to make an exact match for the current route

self[method] = function () {
self.on.apply(self, [method].concat(Array.prototype.slice.call(arguments)));
var extra = arguments.length === 1
? [method, '']
: [method];
self.on.apply(self, extra.concat(Array.prototype.slice.call(arguments)));
};

@@ -601,0 +607,0 @@ })(methods[i]);

@@ -5,3 +5,3 @@ {

"author": "Nodejitsu Inc <info@nodejitsu.com>",
"version": "1.0.5",
"version": "1.0.6",
"maintainers": [ "hij1nx <hij1nx@me.com>", "indexzero <charlie.robbins@gmail.com>" ],

@@ -8,0 +8,0 @@ "contributors": [

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

router.get(/foo\/bar\/(\w+)/, helloWorld);
router.get(/foo\/update\/(\w+)/, helloWorld);
router.path(/bar\/bazz\//, function () {

@@ -70,2 +71,3 @@ this.get(/(\w+)/, helloWorld)

"a request to foo/bar/bark": assertGet('foo/bar/bark'),
"a request to foo/update/bark": assertGet('foo/update/bark'),
"a request to bar/bazz/bark": assertGet('bar/bazz/bark')

@@ -72,0 +74,0 @@ }

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