-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fixed #12 #13
Fixed #12 #13
Conversation
I overlooked some things with the qualifiers. I'll fix them as fast as possible:
(Both fixed now) |
Thanks for the PR! On the PR's content, from what I saw, I would prefer not breaking the current interface, and only get the qualifiers if a given option is passed, what do you think? |
I changed it to work like this: wdk.simplifyClaims(entity.claims, null, null, true)
wdk.simplifyPropertyClaims(entity.claims.P50, null, null, true)
wdk.simplifyClaim(entity.claims.P50[0], null, null, true) |
Note: I only found the commenting-code-inline button when it was too late. The tests seem good although for (let [index, value] of array.entries()) {
// ...
} Formatting is entirely you choice, of course. Line-by-line:
const simpleQualifiers = {}
.slice()
.map(simplifyQualifierClaim) const simplifyQualifierClaim = function (claim) {
return simplifyClaim({ mainsnak: claim }, entityPrefix, propertyPrefix)
} and .map(simplifyQualifierClaim) Concerning the implementation issue: I changed from calling |
I tend to write return bar
.slice()
.map(buzz) but add indentation when the result of the chain is assigned to some variable var foo = bar
.slice()
.map(buzz) I find it clearer, but some might find it inconsistent I guess ^^ |
as suggested by larsgw #13 (comment)
@larsgw I just released 4.2.0, thank you for your contribution \o/ |
It should fix #12 and I fixed the test cases to accommodate the API change. Compiling with coffee 1.12.2 instead of 1.11.1, which makes most of the changes. Perhaps the API change should be optional, but that's not for me to decide. I haven't updated the docs yet.