Socket
Socket
Sign inDemoInstall

denodeify

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

test/multiple-arguments.js

14

index.js

@@ -1,10 +0,14 @@

module.exports = function(fun) {
module.exports = function(fun, filter) {
return function() {
var args = Array.prototype.slice.call(arguments, 0);
return new Promise(function(resolve, reject) {
args.push(function(err, data) {
if (err) {
reject(err);
args.push(function(err) {
var args = Array.prototype.slice.call(arguments, 0);
if (filter) {
args = filter.apply(this, args);
}
if (args[0]) {
reject(args[0]);
} else {
resolve(data);
resolve(args[1]);
}

@@ -11,0 +15,0 @@ });

{
"name": "denodeify",
"version": "1.0.0",
"description": "",
"version": "1.1.0",
"description": "Tool to wrap functions with Node style APIs",
"main": "index.js",

@@ -6,0 +6,0 @@ "directories": {

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