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

acomb

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acomb - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

9

index.js

@@ -25,9 +25,10 @@ var acomb = exports;

var callback = _last(arguments),
args = _initial(arguments);
args = _initial(arguments),
result;
try {
var result = func.apply(this, args);
callback(null, result);
result = func.apply(this, args);
} catch (e) {
callback(e);
return callback(e);
}
callback(null, result);
};

@@ -34,0 +35,0 @@ };

{
"name": "acomb",
"version": "1.2.1",
"version": "1.2.2",
"description": "Higher-order utilities for use with async functions",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -45,2 +45,14 @@ var a = require("./");

});
it("should not catch errors in the callback", function (done) {
try {
a.asyncify(function () {})(function (err) {
if (err) { return done(new Error("should not get an error here")); }
throw new Error("callback error");
});
} catch (e) {
assert(e.message === "callback error");
done();
}
});
});

@@ -47,0 +59,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