-
Notifications
You must be signed in to change notification settings - Fork 29
implicit conversions for attributes and values #71
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
Conversation
Current coverage is 95.23% (diff: 100%)@@ master #71 diff @@
==========================================
Files 13 15 +2
Lines 444 462 +18
Methods 444 462 +18
Messages 0 0
Branches 0 0
==========================================
+ Hits 422 440 +18
Misses 22 22
Partials 0 0
|
Thanks for the contribution, @emanresusername. @zmeda, WDYT? |
9555391
to
429102d
Compare
added some optional conversions cause i found myself doing this pattern a lot too val attributes = List(Attribute("name", StringValue(model.value)) ++
model.optionalValue.map(value => Attribute("optionalName", StringValue(value))) now can just do val optionalAttribute: Option[Attribute] = "optionalName" -> model.optionalValue
val attributes = List(Attribute("name", StringValue(model.value)) ++ optionalAttribute couldn't get it to work inline as val attributes = List(Attribute("name", StringValue(model.value)) ++
"optionalName" -> model.optionalValue that'd be ideal if somebody knows how to get that syntax to work off the top of their head |
Thanks again, @emanresusername -- wanted to make sure we acknowledge your efforts to continue supporting our project. |
Thanks for PR, I'll publish new version soon. |
if you wanted to wait a little while on the new version, i'm gonna add a few more in for null, jsarrayvalue and jsobjectvalue that i just started hitting today 😅 |
@zmeda @emanresusername Was the optional value removed? as I cannot find it here. I would like to not show some keys if their values are |
found myself doing
a lot, was nicer to just have this