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

appa

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appa - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

18

index.js

@@ -5,2 +5,3 @@ var qs = require('qs')

var createRouter = require('match-routes')
var isType = require('type-is')
var bole = require('bole')

@@ -45,8 +46,17 @@

if (req.method === 'POST' || req.method === 'PUT' || req.method === 'PATCH') {
parse(req, res, function (err, body) {
if (options.log) log.error('Bad Request, invalid JSON', err)
if (err) return sendError(res, 400, 'Bad Request, invalid JSON')
console.log('isType', isType(req, ['json']))
if (isType(req, ['json'])) return parse(req, res, handleParse)
callback(req, res, context)
function handleParse (err, body) {
console.log('handleParse')
if (err) {
if (options.log) log.error('Bad Request, invalid JSON', err)
return sendError(res, 400, 'Bad Request, invalid JSON')
}
context.body = body
callback(req, res, context)
})
}
} else {

@@ -53,0 +63,0 @@ callback(req, res, context)

{
"name": "appa",
"version": "2.1.0",
"version": "3.0.0",
"description": "Quickly build micro services.",

@@ -21,2 +21,3 @@ "main": "index.js",

"dependencies": {
"accepts": "^1.3.2",
"body": "^5.1.0",

@@ -23,0 +24,0 @@ "bole": "^2.0.0",

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