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

@aofl/middleware

Package Overview
Dependencies
Maintainers
2
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aofl/middleware - npm Package Compare versions

Comparing version 1.4.1 to 2.0.0-alpha.5

4

package.json
{
"name": "@aofl/middleware",
"version": "1.4.1",
"version": "2.0.0-alpha.5",
"description": "Simple base middleware class",

@@ -24,3 +24,3 @@ "main": "index.js",

},
"gitHead": "60297b316858cd061ea1c221a7e04406b910ef38"
"gitHead": "00d91514e0c953e8cd998150ed5705b87db20b39"
}

@@ -25,4 +25,4 @@ /**

use(callback, hook) {
if (typeof callback !== 'function') throw new Error('callback must be a function');
if (typeof this.middleware[hook] === 'undefined') throw new Error(`Only ${Object.keys(this.middleware)} hooks are supported.`);
if (typeof callback !== 'function') { throw new Error('callback must be a function'); }
if (typeof this.middleware[hook] === 'undefined') { throw new Error(`Only ${Object.keys(this.middleware)} hooks are supported.`); }
this.middleware[hook].push({

@@ -65,3 +65,3 @@ callback,

iterateMiddleware(request, hook, response = null) {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
const iterator = this.getMiddlewareIterator(hook);

@@ -68,0 +68,0 @@ let mw = null;

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