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

promy

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promy - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

29

index.js

@@ -1,17 +0,14 @@

module.exports = function(fn){
return function(obj, cb){
if(cb && cb instanceof Function){
fn(obj, cb);
} else {
return new Promise((resolve, reject) => {
fn(obj, (err, res) => {
if(err){
reject(err);
} else {
resolve(res);
}
});
});
}
};
module.exports = fn => (obj, cb) => {
if(cb && cb instanceof Function){
return fn(obj, cb);
}
return new Promise((resolve, reject) => {
fn(obj, (err, res) => {
if(err){
reject(err);
} else {
resolve(res);
}
});
});
};
{
"name": "promy",
"version": "1.0.1",
"version": "1.0.2",
"description": "Conditional promisify",

@@ -19,4 +19,4 @@ "main": "index.js",

"ava": "^0.25.0",
"eslint": "^4.19.1",
"eslint-config-astur": "0.0.2",
"eslint": "^5.4.0",
"eslint-config-astur": "^1.6.1",
"nyc": "^12.0.2"

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