Socket
Socket
Sign inDemoInstall

express-promise

Package Overview
Dependencies
93
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.4.0

15

lib/express_promise.js

@@ -20,3 +20,3 @@ var isPromise = function(v) {

return object.then(function(result) {
if (isPromise(result)) {
if (isPromise(result) || isMongooseQuery(result)) {
resolveAsync(result, callback, count - 1, options);

@@ -31,2 +31,15 @@ } else {

if (isMongooseQuery(object)) {
return object.exec(function(err, result) {
if (err) {
callback(err);
}
if (isPromise(result) || isMongooseQuery(result)) {
resolveAsync(result, callback, count - 1, options);
} else {
callback(err, result);
}
});
}
if (options.skipTraverse && options.skipTraverse(object)) {

@@ -33,0 +46,0 @@ return callback(null, object);

2

package.json
{
"name": "express-promise",
"version": "0.3.0",
"version": "0.4.0",
"scripts": {

@@ -5,0 +5,0 @@ "test": "mocha -R spec"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc