Socket
Socket
Sign inDemoInstall

async-manager-promise

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

11

build/index.js

@@ -7,4 +7,11 @@ import AsyncManager from 'async-manager';

getPromise(id) {
const promise = new Promise(async (resolve) => {
this.manager.add(id, resolve);
const promise = new Promise(async (resolve, reject) => {
this.manager.add(id, (err, data) => {
if (err) {
reject(err);
}
else {
resolve(data);
}
});
});

@@ -11,0 +18,0 @@ return promise;

2

package.json
{
"name": "async-manager-promise",
"version": "0.0.3",
"version": "0.0.4",
"description": "TODO",

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

@@ -7,4 +7,10 @@ import AsyncManager from 'async-manager'

getPromise(id: Id) {
const promise = new Promise<OutputType>(async (resolve) => {
this.manager.add(id, resolve)
const promise = new Promise<OutputType>(async (resolve, reject) => {
this.manager.add(id, (err, data) => {
if (err) {
reject(err)
} else {
resolve(data)
}
})
})

@@ -11,0 +17,0 @@

Sorry, the diff of this file is not supported yet

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