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

chaosrouter

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chaosrouter - npm Package Compare versions

Comparing version 0.2.16 to 0.2.17

23

chaosrouter.js

@@ -104,3 +104,4 @@

}
ChaosRouter.directivePrefix = '#_';
ChaosRouter.directivePrefix = '__';
ChaosRouter.directiveSuffix = '__';
ChaosRouter.prototype.__directives__ = {};

@@ -141,4 +142,6 @@ ChaosRouter.prototype.directive = function (name, fn) {

for (var k in data) {
if (k.indexOf(ChaosRouter.directivePrefix) === 0) {
var name = k.slice(ChaosRouter.directivePrefix.length);
var noprefix = k.slice(ChaosRouter.directivePrefix.length);
if ( k.indexOf(ChaosRouter.directivePrefix) === 0
&& noprefix.indexOf(ChaosRouter.directiveSuffix) === (noprefix.length - ChaosRouter.directiveSuffix.length)) {
var name = k.slice(ChaosRouter.directivePrefix.length, -ChaosRouter.directiveSuffix.length);
directives[name] = data[k];

@@ -162,3 +165,3 @@ delete data[k];

var validateKey = ChaosRouter.directivePrefix+'validate';
var validateKey = ChaosRouter.directivePrefix+'validate'+ChaosRouter.directiveSuffix;
var validates = data[validateKey] || [];

@@ -196,3 +199,3 @@ for (var i in segs) {

variables[vkey.slice(1)] = seg;
variables[vkey.slice(1)] = unescape(seg);
jsonkeys.push(vkey);

@@ -246,3 +249,3 @@ }

this.path = path;
this.path = path_vars;
this.path_vars = path_vars;
this.router = router;

@@ -292,2 +295,6 @@ this.config = config;

}
Endpoint.prototype.explode = function(args, fn, context) {
var ctx = context || this;
return fn.apply(ctx, args);
}
Endpoint.prototype.method = function() {

@@ -307,2 +314,6 @@ var args = Array.prototype.slice.call(arguments);

return new Promise(function(f,r) {
if (!endpoint)
r({ error: "Dead End",
message: "Respond endpoint '"+path+"' does not exist." });
endpoint.execute(extend({}, self.args))

@@ -309,0 +320,0 @@ .then(function(d) {

{
"name": "chaosrouter",
"version": "0.2.16",
"version": "0.2.17",
"description": "ERROR: No README data found!",

@@ -23,4 +23,3 @@ "main": "chaosrouter.js",

"populater": "^0.2.2",
"promise": "^7.0.4",
"restruct-data": "^0.2.10"
"promise": "^7.0.4"
},

@@ -27,0 +26,0 @@ "devDependencies": {

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