Skip to content

Commit 0fcc541

Browse files
refactor: migrate to ES6 syntax
1 parent 11dc4f3 commit 0fcc541

File tree

13 files changed

+1697
-1864
lines changed

13 files changed

+1697
-1864
lines changed

lib/index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
const Socket = require('./socket');
12

2-
module.exports = require('./socket');
3+
module.exports = (uri, opts) => new Socket(uri, opts);
34

45
/**
5-
* Exports parser
6-
*
7-
* @api public
8-
*
6+
* Expose deps for legacy compatibility
7+
* and standalone browser access.
98
*/
9+
10+
module.exports.Socket = Socket;
11+
module.exports.protocol = Socket.protocol; // this is an int
12+
module.exports.Transport = require('./transport');
13+
module.exports.transports = require('./transports/index');
1014
module.exports.parser = require('engine.io-parser');

0 commit comments

Comments
 (0)