Skip to content

Commit 3a776c5

Browse files
committed
export functions directly, where possible
1 parent 3b95001 commit 3a776c5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ exports = module.exports = require('./duplex')
22

33
exports.source = require('./source');
44
exports.sink = require('./sink');
5-
exports.createServer = require('./server').createServer
6-
exports.connect = require('./client').connect
5+
exports.createServer = require('./server')
6+
exports.connect = require('./client')

server.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ var url = require('url')
44
var http = require('http')
55
var https = require('https')
66

7-
exports.connect = require('./client').connect
8-
97
var EventEmitter = require('events').EventEmitter
108

11-
exports.createServer = function (opts, onConnection) {
9+
module.exports = function (opts, onConnection) {
1210
var emitter = new EventEmitter()
1311
var server
1412
if (typeof opts === 'function'){
@@ -61,6 +59,3 @@ exports.createServer = function (opts, onConnection) {
6159
return emitter
6260
}
6361

64-
65-
66-

0 commit comments

Comments
 (0)