Socket
Socket
Sign inDemoInstall

koa-compose

Package Overview
Dependencies
Maintainers
11
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-compose - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

5

index.js

@@ -9,2 +9,6 @@ 'use strict'

function flatten (arr) {
return arr.reduce((acc, next) => acc.concat(Array.isArray(next) ? flatten(next) : next), [])
}
/**

@@ -22,2 +26,3 @@ * Compose `middleware` returning

if (!Array.isArray(middleware)) throw new TypeError('Middleware stack must be an array!')
middleware = flatten(middleware)
for (const fn of middleware) {

@@ -24,0 +29,0 @@ if (typeof fn !== 'function') throw new TypeError('Middleware must be composed of functions!')

2

package.json

@@ -5,3 +5,3 @@ {

"repository": "koajs/compose",
"version": "4.1.0",
"version": "4.2.0",
"keywords": [

@@ -8,0 +8,0 @@ "koa",

@@ -21,3 +21,3 @@

### compose([a, b, c, ...])
### compose([a, [b, c,] ...])

@@ -24,0 +24,0 @@ Compose the given middleware and return middleware.

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