That second one with ramda is a prime example of garbage code from a developer proving theyve read some functional programming books / blog posts. Why would you ever do that as opposed to the nested ternary? Functional programming is great but the use of ramda is complete nonsense for that example.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.