27 ms·
Agree with the post. On JSON, I always do { unit:XXXX, value:XXXX }, it is quite verbose but it does help a lot when you least expect it. I also wrote a small
by moralestapia 5y ago
Agree with the post.
On JSON, I always do { unit:XXXX, value:XXXX }, it is quite verbose but it does help a lot when you least expect it.
I also wrote a small utility that transforms between values like { unit:'m', value:5 } to { unit:'km', value:0.005 } so that makes it super easy for me to pipe stuff from one context to another when is needed.
- linkdd 5y agoDo you have a link to this utility?
- moralestapia 5y agoOh sorry, I haven't open sourced it, I never thought of it actually until now. As I now realize, it could be quite useful for others.