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

express-validation

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-validation - npm Package Compare versions

Comparing version 3.0.8 to 3.1.0

2

lib/index.js

@@ -19,3 +19,3 @@ const Joi = require('joi');

const validate = (parameter) => schema[parameter].validateAsync(request[parameter], joiOptions)
.then(result => handleMutation(request[parameter], result.value, evOptions.context))
.then(result => handleMutation(request, parameter, result.value, evOptions.context))
.catch(error => ({ [parameter]: error.details }));

@@ -22,0 +22,0 @@

@@ -1,6 +0,4 @@

exports.handleMutation = (request, value, mutate) => {
exports.handleMutation = (request, parameter, value, mutate) => {
if (mutate) {
Object.keys(value).forEach(parameter => {
Object.defineProperty(request, parameter, { value: value[parameter], enumerable: true });
});
request[parameter] = value;
}

@@ -7,0 +5,0 @@

{
"name": "express-validation",
"version": "3.0.8",
"version": "3.1.0",
"author": "Andrew Keig <andrew.keig@gmail.com>",

@@ -36,5 +36,5 @@ "description": "express-validation is a middleware that validates a request and returns a response with errors; if any of the configured validation rules fail.",

"dependencies": {
"joi": "17.x.x",
"@types/express": "4.x.x",
"@types/hapi__joi": "16.x.x"
"@types/express": "^4.17.13",
"@types/hapi__joi": "16.x.x",
"joi": "^17.6.0"
},

@@ -41,0 +41,0 @@ "jest": {

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