Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #107 from ruxkor/patch-1

invoking as a function causes attach, refs #104
  • Loading branch information...
commit 72b32827f437f0eedf485137a6af976536931fe4 2 parents 82b16fa + 7f08ee3
@rauchg rauchg authored
Showing with 16 additions and 1 deletion.
  1. +16 −1 lib/engine.io.js
View
17 lib/engine.io.js
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -152,3 +151,19 @@ exports.attach = function (server, options) {
return engine;
};
+
+
+/**
+ * Invoking the library as a function delegates to attach
+ *
+ * @param {http.Server} server
+ * @param {Object} options
+ * @return {Server} engine server
+ * @api public
+ */
+
+module.exports = function() {
+ return exports.attach.apply(this, arguments);
+}
+
+module.exports.__proto__ = exports;
Please sign in to comment.
Something went wrong with that request. Please try again.