remove legacy, unused #getServerByRank method

This commit is contained in:
Nick Krecklow 2020-04-29 04:03:59 -05:00
parent be92449d52
commit 0e19904c39
No known key found for this signature in database
GPG Key ID: 5F149FDE156FFA94

@ -64,23 +64,6 @@ export class ServerRegistry {
}
}
getServerRankBy (serverRegistration, x, sort) {
const records = Object.values(this._registeredServers)
.map(x)
.filter(val => val !== undefined)
// Invalidate any results that do not account for all serverRegistrations
if (records.length === this._registeredServers.length) {
records.sort(sort)
// Pull matching data from target serverRegistration
// Assume indexOf cannot be -1 or val undefined since they have been pre-tested in the map call above
const val = x(serverRegistration)
const indexOf = records.indexOf(val)
return indexOf + 1
}
}
getServerRegistrations = () => Object.values(this._registeredServers)
reset () {