Reading all of these solutions, I'm glad I opted to avoid regexes in my answers! There are some messy hacks here ("1234567890abcdef".indexOf(c) stands out) and the types should probably all have been string? instead of string, which would have made this a little more concise, but I'm still pretty happy with how it turned out.
I am annoyed they decided to put multiple K:V pairs on the same line because it made the parsing a little messier but oh well.
Reading all of these solutions, I'm glad I opted to avoid regexes in my answers! There are some messy hacks here (
"1234567890abcdef".indexOf(c)
stands out) and the types should probably all have beenstring?
instead ofstring
, which would have made this a little more concise, but I'm still pretty happy with how it turned out.I am annoyed they decided to put multiple K:V pairs on the same line because it made the parsing a little messier but oh well.