3 ms·
Funny, I actually wrote and maintain a library which, amongst other things, does almost the same thing as your contrived example, except it's camelCase to kebab
by stevage 3y ago
Funny, I actually wrote and maintain a library which, amongst other things, does almost the same thing as your contrived example, except it's camelCase to kebab-case. It's written in Flow though, because that was what I knew at the time.
- com2kid 3y ago> does almost the same thing as your contrived example Sadly, not contrived! Anyone using protocol buffers is actually familiar with this exact scenario. Not sure how the JS PB compiler handles things though, I never bothered to look under the covers. Here is a random sample I found of both the types and the conversion code. https://gist.github.com/alfrdmalr/faa012e421d9f7f60c3e6d2d32581157 https://gist.github.com/alfrdmalr/faa012e421d9f7f60c3e6d2d32...
- stevage 3y agoYeah, cool. In my case I didn't really get all the type stuff right - I was mostly using Flow to be able to generate documentation.