New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

connect-traversal

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-traversal - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

README.md

32

lib/traversal.js
'use strict';
var util = require('util'),
Chain = require('./chain');
var util = require('util')
, Chain = require('./chain');

@@ -41,8 +41,8 @@

if(this.children && this.children[key]) {
this.__traversal__.checkResource(this.children[key]);
factory = this.__traversal__.resources[this.children[key]];
this.traversal_.checkResource(this.children[key]);
factory = this.traversal_.resources[this.children[key]];
}
else if(this.child && this.childValidate(key)) {
this.__traversal__.checkResource(this.child);
factory = this.__traversal__.resources[this.child];
this.traversal_.checkResource(this.child);
factory = this.traversal_.resources[this.child];
}

@@ -65,2 +65,6 @@ return factory ? new factory(key, this) : null;

Resource.prototype.toString = function() {
return util.format('#<Resource[%s]>', this.resource);
};
/**

@@ -92,20 +96,16 @@ * Traversal object.

Traversal.prototype.registerResource = function(id, proto) {
//Constructor for resource
var obj = function () {
this.resource = id;
var inst = obj.__super__.apply(this, arguments);
var inst = obj.super_.apply(this, arguments);
inst.init();
return inst;
};
var Inheritance = function(){};
Inheritance.prototype = Resource.prototype;
obj.prototype = new Inheritance;
obj.prototype.constructor = obj;
obj.prototype.__traversal__ = this;
obj.__super__ = Resource;
// Inheritance of Resource function class
util.inherits(obj, Resource);
obj.prototype.traversal_ = this;
Object.getOwnPropertyNames(proto).forEach(function(name) {
obj.prototype[name] = proto[name];
});
obj.prototype.toString = function() {
return util.format('#<Resource[%s]>', this.resource);
};
// Registration of Resource obj.
this.resources[id] = obj;

@@ -112,0 +112,0 @@ };

{
"name": "connect-traversal",
"version": "0.3.3",
"version": "0.3.4",
"description": "Middleware for Connect and Express application which allows to use URL traversal instead of URL dispatching.",

@@ -40,4 +40,4 @@ "keywords": [

"readmeFilename": "README.md",
"_id": "connect-traversal@0.3.3",
"_id": "connect-traversal@0.3.4",
"_from": "connect-traversal@latest"
}

Sorry, the diff of this file is not supported yet

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