I had this use case where I got data from an API that gave me an id in a string format.
This was the solution:
Number('4'); // 4
Buy me a drink 🍺