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

protein

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protein - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

tests/route.js

8

index.js

@@ -54,7 +54,7 @@ var http = require('http');

req.url = url;
if (!next) return (callback || onerror)(err, req, res);
if (route && req.url.substr(0, route.length) === route) {
req.url = req.url.substr(route.length);
if (route) {
if (req.url.substr(0, route.length) !== route) return loop(err);
req.url = req.url.substr(route.length-1);
}

@@ -61,0 +61,0 @@ try {

{
"name":"protein",
"version":"0.3.0",
"version":"0.3.1",
"repository": "git://github.com/mafintosh/protein",

@@ -5,0 +5,0 @@ "description":"Protein is connect compatible middleware with support for prototype methods, getters, and setters",

@@ -14,5 +14,5 @@ var protein = require('../index');

fn({}, {}, function(err) {
assert.ok(!!err);
assert.equal(err && err.message, 'lol');
complete = true;
});
assert.ok(complete);

@@ -14,3 +14,5 @@ var protein = require('../index');

fn({}, {});
fn({}, {}, function(err) {
throw err;
});
assert.ok(complete);

@@ -27,3 +27,5 @@ var protein = require('../index');

fn({}, {});
fn({}, {}, function(err) {
throw err;
});

@@ -30,0 +32,0 @@ process.nextTick(function() {

@@ -14,4 +14,4 @@ var protein = require('../index');

complete = true;
assert.ok(req.hello === protos1.request.hello);
assert.ok(res.world === protos2.response.world);
assert.equal(req.hello, protos1.request.hello);
assert.equal(res.world, protos2.response.world);
})

@@ -21,3 +21,5 @@ .use(protos1)

fn({}, {});
fn({}, {}, function(err) {
throw err;
});
assert.ok(complete);

@@ -17,3 +17,5 @@ var protein = require('../index');

fn({}, {});
fn({}, {}, function(err) {
throw err;
});
assert.ok(complete);

@@ -16,7 +16,9 @@ var protein = require('../index');

complete = true;
assert.ok(req.hello === protos1.request.hello);
assert.ok(res.world === protos2.response.world);
assert.equal(req.hello, protos1.request.hello);
assert.equal(res.world, protos2.response.world);
});
fn({}, {});
fn({}, {}, function(err) {
throw err;
});
assert.ok(complete);
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