Skip to content

Commit bdb46fa

Browse files
authored
Merge pull request #9 from killbillsbor/nanoid
Replace shortid with nanoid
2 parents cdf06a9 + b837118 commit bdb46fa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/tcpServer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fs = require('fs')
55
const net = require('net')
66
const stream = require('stream')
77
const through2 = require('through2')
8-
const shortid = require('shortid')
8+
const nanoid = require('nanoid')
99
const hex = require('hexer')
1010

1111
var hexerIn = hex.Transform({ prefix: '< ' })
@@ -40,7 +40,7 @@ module.exports = function (debug) {
4040
hexerOut.pipe(self._output)
4141
}
4242

43-
socket.id = shortid.generate()
43+
socket.id = nanoid(7)
4444
socket.setKeepAlive(!!self._keepalive)
4545
if (self._encoding) socket.setEncoding(self._encoding)
4646
self.emit('connection', socket)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"datagram-stream": "^1.1.1",
4646
"debug": "^3.1.0",
4747
"hexer": "^1.5.0",
48-
"shortid": "^2.2.8",
48+
"nanoid": "^0.2.2",
4949
"through2": "^2.0.3"
5050
}
5151
}

0 commit comments

Comments
 (0)