We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hi the ‘isSubsetOf’ method is some kind of lengthy it may be clear like following
isSubsetOf(otherSet) { if (this.size() > otherSet.size()) { return false; } return this.values().every(value => otherSet.has(value)); }
or remain 'isSubset' variable
const isSubset = this.values().every(value => otherSet.has(value)); return isSubset;
The text was updated successfully, but these errors were encountered:
agree with you, and it could be shorter and cleaner:
isSubsetOf(otherSet) { const values = this.values(); return values.every((value) => otherSet.has(value)); }
I will raise a PR on this
Sorry, something went wrong.
@loiane #191
@Jeffzholy thanks, merged!
No branches or pull requests
hi
the ‘isSubsetOf’ method is some kind of lengthy
it may be clear like following
isSubsetOf(otherSet) {
if (this.size() > otherSet.size()) {
return false;
}
return this.values().every(value => otherSet.has(value));
}
or remain 'isSubset' variable
const isSubset = this.values().every(value => otherSet.has(value));
return isSubset;
The text was updated successfully, but these errors were encountered: