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

dat-middleware

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dat-middleware - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

6

lib/RequestData.js

@@ -428,3 +428,3 @@ var error = require('./error');

.map(reqValueForKeypath)
.map(step.validate)
.map(bindRight(step.validate, req))
.filter(exists)

@@ -440,4 +440,4 @@ .map(formatError);

}
function firstError (value, i) {
err = step.validate(value);
function firstError (value, i, vals) {
err = step.validate(value, i, vals, req);
if (err) {

@@ -444,0 +444,0 @@ err = formatError(err, i);

{
"name": "dat-middleware",
"version": "1.8.0",
"version": "1.8.1",
"description": "common request, response, body, query, and param validation, transformation, and flow control middleware",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,3 +9,3 @@ var createAppWithMiddleware = require('./fixtures/createAppWithMiddleware');

describe('next', function() {
describe('normal next', function() {
describe('handle errors', function() {
beforeEach(function () {

@@ -16,3 +16,3 @@ this.app = createAppWithMiddleware(

});
it('should work pass args to console.log', function (done) {
it('should next the error', function (done) {
request(this.app)

@@ -28,3 +28,3 @@ .get('/')

describe('keypaths', function() {
describe('handle keypaths', function() {
beforeEach(function () {

@@ -36,3 +36,3 @@ this.app = createAppWithMiddleware(

});
it('should work replace keypaths before console.log', function (done) {
it('should replace keypaths before nexting', function (done) {
request(this.app)

@@ -39,0 +39,0 @@ .get('/')

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