Socket
Socket
Sign inDemoInstall

express-mock-api-middleware

Package Overview
Dependencies
181
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

express-mock-api-middleware-1.0.5.tgz

7

lib/createMockMiddleware.js

@@ -32,3 +32,3 @@ "use strict";

var VALID_METHODS = ['get', 'post', 'put', 'patch', 'delete'];
// const VALID_METHODS = ['get', 'post', 'put', 'patch', 'delete', 'head'];
var BODY_PARSED_METHODS = ['post', 'put', 'patch', 'delete'];

@@ -102,5 +102,8 @@

} // debug(`parsed: ${method} ${path}`);
// assert(
// VALID_METHODS.includes(method),
// `Invalid method ${method} for path ${path}, please check your mock files.`
// );
(0, _assert.default)(VALID_METHODS.includes(method), "Invalid method ".concat(method, " for path ").concat(path, ", please check your mock files."));
return {

@@ -107,0 +110,0 @@ method: method,

{
"name": "express-mock-api-middleware",
"version": "1.0.4",
"version": "1.0.5",
"description": "Express middleware for mocking restful APIs",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc