Add Number macro
Closed this issue · 1 comments
mriska commented
Would you be open to support an number
macro which wraps https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number?
I found myself writing the following code today:
colspan: sum(collect(7, number('fooVisible'), number('barVisible')))
I basically used the number
macro to turn a boolean into 1 or 0. I know that it would have been done implicitly via coercion, but feel that being explicit about it might be kind on the future reader of the code.
If you feel this is a worthwhile addition, where do we place it in the documentation - under Number
?
kellyselden commented
Sounds good under the number section.