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

resolve-bus-zmq

Package Overview
Dependencies
Maintainers
1
Versions
603
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-bus-zmq - npm Package Compare versions

Comparing version 0.0.1-alpha.79f28edb to 0.0.2-alpha.5e5cbe56

63

dist/index.js

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

var _stringify = require('babel-runtime/core-js/json/stringify');
var _stringify2 = _interopRequireDefault(_stringify);
var _assign = require('babel-runtime/core-js/object/assign');
var _assign2 = _interopRequireDefault(_assign);
var _promise = require('babel-runtime/core-js/promise');
var _promise2 = _interopRequireDefault(_promise);
exports.default = function (options) {
var handler = function handler() {};
var config = (0, _assign2.default)({}, defaultOptions, options);
var initPromise = init(config, function (event) {
return handler(event);
});
return {
publish: function publish(event) {
return initPromise.then(function (_ref4) {
var publisher = _ref4.publisher;
return publisher((0, _stringify2.default)(event));
});
},
setTrigger: function setTrigger(callback) {
return initPromise.then(function () {
return handler = callback;
});
}
};
};
var _zeromq = require('zeromq');

@@ -108,3 +74,3 @@

function init(options, trigger) {
return _promise2.default.resolve().then(function () {
return Promise.resolve().then(function () {
return runBroker(options);

@@ -119,2 +85,27 @@ }).catch(function (err) {

});
}
}
function createDriver(options) {
var handler = function handler() {};
var config = Object.assign({}, defaultOptions, options);
var initPromise = init(config, function (event) {
return handler(event);
});
return {
publish: function publish(event) {
return initPromise.then(function (_ref4) {
var publisher = _ref4.publisher;
return publisher(JSON.stringify(event));
});
},
setTrigger: function setTrigger(callback) {
return initPromise.then(function () {
return handler = callback;
});
}
};
}
exports.default = createDriver;
module.exports = exports['default'];
{
"name": "resolve-bus-zmq",
"version": "0.0.1-alpha.79f28edb",
"version": "0.0.2-alpha.5e5cbe56",
"description": "This package is a driver for resolve-bus to emit events using ZeroMQ.",

@@ -5,0 +5,0 @@ "main": "./dist/index.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