New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

socketmq

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socketmq - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

.esformatter

30

index.js

@@ -1,1 +0,29 @@

module.exports = require('./lib/socketmq');
var Url = require('url');
var net = require('./net')
var Socket = require('./socket')
exports.bind = function(url, options) {
return createSocketMQ('bind', url, options)
}
exports.connect = function(url, options) {
return createSocketMQ('connect', url, options)
}
function isProtocolSupported(protocol) {
if (!net[protocol]) {
var err = 'Transport "' + protocol + '" is not supported. SocketMQ supports: ' + Object.keys(net).join(', ')
throw new Error(err)
}
return protocol
}
function createSocketMQ(type, url, options) {
var target = Url.parse(url)
var protocol = isProtocolSupported(target.protocol.slice(0, -1))
var socket = new Socket()
net[protocol][type](target, socket, options)
return socket
}

25

package.json
{
"name": "socketmq",
"version": "0.0.1",
"description": "Library for building application in ZeroMQ-like messaging semantics end to end. Build upon node.js and Engine.IO",
"keywords": ["zeromq", "zmq", "message", "queue", "engine.io"],
"author": "Senmiao Liu <zir.echo@gmail.com>",
"version": "0.1.0",
"description": "Lightweight stream-oriented messaging library for node.",
"main": "index.js",
"directories": {
"example": "example"
},
"dependencies": {
"zmq": "2.2.0",
"engine.io": "0.4.3",
"engine.io-client": "0.4.3",
"debug": "0.7.2"
"amp": "0.3.1"
},
"devDependencies": {
"mocha": "*",
"chai": "*",
"coffee-script": "1.4.x"
"humanize-number": "0.0.2"
},
"main": "index"
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "lsm",
"license": "MIT"
}

Sorry, the diff of this file is not supported yet

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