-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement identification primitives #304
Conversation
lib/identification.js
Outdated
this.host = host; | ||
this.ports = ports; | ||
if (this.ports.length > 1) { | ||
this.ports = sequence(this.ports, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.ports = ports.length > 1 ? sequence(this.ports, 0) : ports
lib/identification.js
Outdated
return [arrayifyTree(node[0]), arrayifyTree(node[1])]; | ||
} else { | ||
return node; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}
return node;
}
|
||
const contains = (test, object, expected) => { | ||
for (const key in expected) { | ||
if (!expected.hasOwnProperty(key)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer Object.keys
instead of manual checking properties here.
Ping @nechaido, @tshemsedinov. |
ping @tshemsedinov |
Refs: #8 Refs: metarhia/Metarhia#21 PR-URL: #304
PR-URL: #304 Co-authored-by: Mykola Bilochub <[email protected]>
a67d9dc
to
6f8d80c
Compare
Refs: #8
Refs: metarhia/Metarhia#21