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

kookaburra

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kookaburra - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

21

index.js

@@ -15,2 +15,10 @@ const Package = require('./package.json');

.then((handlerResult) => {
// If the handlerResult is undefined, it's probably because the value was already
// provided in the handler and we just returned by default.
if (handlerResult === undefined && pluginOptions.skipUndefined) {
request.log(['handler'],
`Undefined return value ignored in generator handler ${handler.name}`);
return;
}
// If the success result of the handler is an error either:

@@ -22,3 +30,3 @@ // 1. An error was returned.

// For this reason, if it is an error, we just ignore it.
if (handlerResult.isBoom && pluginOptions.skipReturnError) {
if (handlerResult !== undefined && handlerResult.isBoom && pluginOptions.skipReturnError) {
request.log(['handler'], `Unthrown error ignored in generator handler ${handler.name}`);

@@ -32,3 +40,4 @@ return;

// is probably enough to determine that reply was already called and we should do nothing.
if (handlerResult.statusCode !== undefined &&
if (handlerResult !== undefined &&
handlerResult.statusCode !== undefined &&
handlerResult.headers !== undefined &&

@@ -40,10 +49,2 @@ handlerResult.source !== undefined &&

// If the handlerResult is undefined, it's probably because the value was already
// provided in the handler and we just returned by default.
if (handlerResult === undefined && pluginOptions.skipUndefined) {
request.log(['handler'],
`Undefined return value ignored in generator handler ${handler.name}`);
return;
}
// In every other case, reply with the return value

@@ -50,0 +51,0 @@ reply(handlerResult);

{
"name": "kookaburra",
"version": "1.0.1",
"version": "1.0.2",
"description": "Kookaburra is a Hapi plugin that lets you use generator function coroutines as handlers using Bluebird",

@@ -5,0 +5,0 @@ "repository": "xargi/kookaburra",

@@ -0,0 +0,0 @@ # Kookaburra

@@ -0,0 +0,0 @@ const Hapi = require('hapi');

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