@JIH7
Posted
I think your code looks great and you have a very comprehensive solution! I also did this challenge recently. I don't know if this is better or worse overall, but rather than fully checking valid IP and domain formatting, I did a check to see if the input is all numbers and dots to determine whether to make a request for IP or domain. Then if the API returns an error I put the error message on screen. My solution's repo is here if you wanna compare!
https://github.com/JIH7/iptracker
The UI is also very crisp. The only issue I can find is that the map draws on top of the "result" div when clicked. I'm sure giving it a higher z-index value would fix this!
Marked as helpful