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

fh-wfm-mediator

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fh-wfm-mediator - npm Package Compare versions

Comparing version 0.1.0-rc3 to 0.1.0-rc4

22

lib/mediator.js

@@ -7,3 +7,2 @@ 'use strict';

/**

@@ -79,4 +78,4 @@ * A version of {@link once} that returns a Promise

function unsubscribe() {
self.remove(topics.done, subs.done.id);
self.remove(topics.error, subs.error.id);
self.remove(topics.done, subs.done);
self.remove(topics.error, subs.error);
}

@@ -90,14 +89,15 @@

}
// must setup subscriptions before publish
var resultPromise = new Promise(function(resolve, reject) {
subs.done = self.once(topics.done, resolve);
subs.error = self.once(topics.error, reject);
});
self.publish.apply(mediator, args);
return new Promise(function(resolve, reject) {
subs.done = self.once(topics.done, resolve);
subs.error = mediator.once(topics.error, reject);
})
return resultPromise
.timeout(options.timeout, new Error('Mediator request timeout for topic ' + topic))
.tap(unsubscribe)
.catch(function(e) {
.finally(function() {
unsubscribe();
// still forward the rejection to clients
throw e;
});

@@ -104,0 +104,0 @@ };

{
"name": "fh-wfm-mediator",
"version": "0.1.0-rc3",
"version": "0.1.0-rc4",
"description": "An implementation of the mediator pattern for use with WFM",

@@ -5,0 +5,0 @@ "main": "lib/angular/mediator-ng.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