Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
- added getBuckets test for distance and lastUpdated order
- resetting buckets work
- changing utility names
  • Loading branch information
CMCDragonkai authored and tegefaulkes committed Mar 23, 2022
1 parent bf31794 commit cc16af9
Show file tree
Hide file tree
Showing 46 changed files with 3,177 additions and 1,283 deletions.
220 changes: 67 additions & 153 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"dependencies": {
"@grpc/grpc-js": "1.3.7",
"@matrixai/async-init": "^1.6.0",
"@matrixai/db": "^1.1.5",
"@matrixai/db": "^1.2.1",
"@matrixai/id": "^3.3.2",
"@matrixai/logger": "^2.1.0",
"@matrixai/workers": "^1.2.5",
Expand Down Expand Up @@ -109,6 +109,7 @@
"@types/cross-spawn": "^6.0.2",
"@types/google-protobuf": "^3.7.4",
"@types/jest": "^26.0.20",
"@types/level": "^6.0.0",
"@types/nexpect": "^0.4.31",
"@types/node": "^14.14.35",
"@types/node-forge": "^0.9.7",
Expand Down
4 changes: 3 additions & 1 deletion src/network/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ function isHostname(hostname: any): hostname is Hostname {

/**
* Ports must be numbers between 0 and 65535 inclusive
* If connect is true, then port must be a number between 1 and 65535 inclusive
*/
function isPort(port: any): port is Port {
function isPort(port: any, connect: boolean = false): port is Port {
if (typeof port !== 'number') return false;
if (port < 0 || port > 65535) return false;
if (connect && port === 0) return false;
return true;
}

Expand Down
Loading

0 comments on commit cc16af9

Please sign in to comment.