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

arangojs

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arangojs - npm Package Compare versions

Comparing version 3.8.3 to 3.8.4

24

lib/util/promisify.js
'use strict';
module.exports = function (PromiseCtor) {
if (PromiseCtor === false) {
return function (callback) {
return { callback: callback || function () {} };
return function () {
var callback = arguments[0] === undefined ? function () {} : arguments[0];
return { callback: callback };
};
}
return function (callback) {
return function () {
var callback = arguments[0] === undefined ? function () {} : arguments[0];
if (!PromiseCtor && typeof Promise !== 'function') {
return { callback: callback || function () {} };
return { callback: callback };
}
function defer(resolve, reject) {
var errback = callback;
callback = function (err, res) {
if (err) reject(err);else resolve(res);
if (errback) errback(err, res);
};
}
var cb = callback;
var promise = PromiseCtor ? new PromiseCtor(defer) : new Promise(defer);
if (cb) {
promise.then(function (result) {
return cb(null, result);
}, function (reason) {
return cb(reason);
});
}
return { callback: callback, promise: promise };
};
};
{
"name": "arangojs",
"version": "3.8.3",
"version": "3.8.4",
"description": "The official ArangoDB JavaScript driver.",

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

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