You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
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

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 @@