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

koa-convert

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-convert - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

8

index.js

@@ -16,5 +16,7 @@ 'use strict'

}
return function (ctx, next) {
const converted = function (ctx, next) {
return co.call(ctx, mw.call(ctx, createGenerator(next)))
}
converted._name = mw._name || mw.name
return converted
}

@@ -43,3 +45,3 @@

}
return function * (next) {
const converted = function * (next) {
let ctx = this

@@ -58,2 +60,4 @@ let called = false

}
converted._name = mw._name || mw.name
return converted
}
{
"name": "koa-convert",
"version": "1.1.0",
"version": "1.2.0",
"keywords": [

@@ -5,0 +5,0 @@ "koa",

@@ -28,2 +28,7 @@ /* global describe, it */

it('should inherit the original middleware name', () => {
let mw = convert(function * testing (next) {})
assert.strictEqual(mw._name, 'testing')
})
it('should work with `yield next`', () => {

@@ -200,2 +205,7 @@ let call = []

})
it('should inherit the original middleware name', () => {
let mw = convert.back(function testing (ctx, next) {})
assert.strictEqual(mw._name, 'testing')
})
})

@@ -202,0 +212,0 @@

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