diff --git a/client.js b/client.js index 6ddf184..48f0dfb 100644 --- a/client.js +++ b/client.js @@ -3,7 +3,6 @@ const EventEmitter = require('events') const once = require('once') const parallel = require('run-parallel') const Peer = require('simple-peer') -const uniq = require('uniq') const common = require('./lib/common') const HTTPTracker = require('./lib/client/http-tracker') // empty object in browser @@ -71,7 +70,8 @@ class Client extends EventEmitter { } return announceUrl }) - announce = uniq(announce) + // remove duplicates by converting to Set and back + announce = Array.from(new Set(announce)) const webrtcSupport = this._wrtc !== false && (!!this._wrtc || Peer.WEBRTC_SUPPORT) diff --git a/package.json b/package.json index 3498377..9edaa1b 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "simple-peer": "^9.0.0", "simple-websocket": "^8.0.0", "string2compact": "^1.1.1", - "uniq": "^1.0.1", "unordered-array-remove": "^1.0.2", "ws": "^7.0.0" },