Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added back `.createSocket()` for BC. Closes #86

  • Loading branch information...
commit 5145300c8feec640d0bd0c70ea932484c9c8c5ee 1 parent 012b359
@tj tj authored
Showing with 6 additions and 1 deletion.
  1. +2 −1  lib/index.js
  2. +4 −0 test/test.socket.js
View
3  lib/index.js
@@ -338,7 +338,8 @@ Socket.prototype.close = function() {
* @api public
*/
-exports.socket = function(type, options) {
+exports.socket =
+exports.createSocket = function(type, options) {
var sock = new Socket(type);
for (var key in options) sock[key] = options[key];
return sock;
View
4 test/test.socket.js
@@ -2,6 +2,10 @@
var zmq = require('../')
, should = require('should');
+// alias
+
+zmq.createSocket.should.equal(zmq.socket);
+
// .socket
var sock = zmq.socket('req');
Please sign in to comment.
Something went wrong with that request. Please try again.