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

quinn

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quinn - npm Package Compare versions

Comparing version 2.0.0-pre6 to 2.1.0

38

dist/quinn.js

@@ -6,2 +6,3 @@ 'use strict';

var Debug = require('debug');
var Bluebird = require('bluebird');

@@ -75,1 +76,38 @@ var respond = require('quinn-respond');

} module.exports.runRequestHandler = runRequestHandler;
function allValidHandlers(handlerArray) {
if (handlerArray.length < 1) {
return false;
}
return handlerArray.every(function(handler) {
return typeof handler === 'function';
});
}
function firstHandler() {
var handlers = Array.prototype.slice.call(arguments);
if (!allValidHandlers(handlers)) {
var err = new Error('Usage: firstHandler(handler1, handler2, ...)');
return function() {
return Bluebird.reject(err);
};
}
function _tryFirst(idx, req, params) {
var handler = handlers[idx];
++idx;
return Bluebird.try(handler, [req, params])
.then(function(res) {
if (res === undefined && idx < handlers.length) {
return _tryFirst(idx, req, params);
} else {
return res;
}
});
}
return function(req, params) {
return _tryFirst(0, req, params);
};
} module.exports.firstHandler = firstHandler;

5

package.json
{
"name": "quinn",
"version": "2.0.0-pre6",
"version": "2.1.0",
"description": "Maybe coming some day.",

@@ -26,6 +26,9 @@ "main": "dist/quinn.js",

"devDependencies": {
"envify": "^1.2.1",
"jshint": "~2.5.1",
"mocha": "^1.20.1",
"quinn-render": "^1.0.0",
"quinn-router": "^1.0.1",
"quinnc": "^1.0.0",
"react": "^0.10.0",
"reakt": "0.0.5"

@@ -32,0 +35,0 @@ },

.npmignore

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