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 0.1.0 to 1.0.0

.editorconfig

12

index.js

@@ -1,2 +0,2 @@

module.exports = function (fn){
module.exports = function(fn){
return function(obj, cb){

@@ -6,4 +6,4 @@ if(cb && cb instanceof Function){

} else {
return new Promise((resolve, reject)=>{
fn(obj, (err, res)=>{
return new Promise((resolve, reject) => {
fn(obj, (err, res) => {
if(err){

@@ -15,5 +15,5 @@ reject(err);

});
})
});
}
}
}
};
};
{
"name": "promy",
"version": "0.1.0",
"version": "1.0.0",
"description": "Conditional promisify",
"main": "index.js",
"author": "astur <astur@yandex.ru> (http://kozlov.am/)",
"scripts": {
"test": "eslint . && nyc ava -v"
},
"repository": {

@@ -10,2 +14,11 @@ "type": "git",

},
"engines": {
"node": ">=8.0.0"
},
"devDependencies": {
"ava": "^0.25.0",
"eslint": "^4.19.1",
"eslint-config-astur": "0.0.2",
"nyc": "^12.0.2"
},
"keywords": [

@@ -17,4 +30,3 @@ "promisify",

],
"author": "astur <astur@yandex.ru> (http://kozlov.am/)",
"license": "MIT"
}
}

@@ -5,2 +5,6 @@ # promy

[![Build Status][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
## Install

@@ -14,3 +18,3 @@

It works like easy old good promisify, so if you have some async callback-based function you can do something like this:
If you have some async function getting calback as second parameter you can do something like this:

@@ -43,2 +47,7 @@ ```js

MIT
MIT
[npm-url]: https://npmjs.org/package/promy
[npm-image]: https://badge.fury.io/js/promy.svg
[travis-url]: https://travis-ci.org/astur/promy
[travis-image]: https://travis-ci.org/astur/promy.svg?branch=master
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