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

ginga

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ginga - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

17

index.js

@@ -108,2 +108,4 @@ var is = require('./is')

ctx.args = args
ctx.resolve = next.bind(null, null)
ctx.reject = next

@@ -132,5 +134,14 @@ var index = 0

fn.call(self, ctx, next)
// args without next()
if (fn.length < 2) next()
var val = fn.call(self, ctx, next)
if (fn.length < 2) {
// args without next()
if (val && is.function(val.then)) {
// thenable
val.then(function () {
next()
}).catch(next)
} else {
next()
}
}
} else {

@@ -137,0 +148,0 @@ // trigger empty callback if no more pipe

2

package.json
{
"name": "ginga",
"version": "2.1.1",
"version": "2.1.2",
"description": "Middleware framework for JavaScript functions",

@@ -5,0 +5,0 @@ "scripts": {

@@ -39,3 +39,8 @@ var tape = require('tape')

function (ctx) {
ctx.logs.push('more')
return new Promise(function (resolve) {
setTimeout(function () {
ctx.logs.push('more')
resolve() // no value, should do next
}, 10)
})
},

@@ -48,7 +53,9 @@ function (ctx) {

'tock',
function (ctx, next) {
// resolver function err
next(function (res) {
t.error('resolver called')
})('booooom')
function (ctx) {
// promise reject
return new Promise(function (resolve, reject) {
setTimeout(function () {
reject('booooom') // no value, should do next
}, 10)
})
}

@@ -55,0 +62,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