Native JS Promise Retry Wrapper

Problem Overview: I have a GreaseMonkey/TamperMonkey script in FireFox that sends several GM_xmlhttpRequest (essentially similar to a xml http request, however this wrapper allows ease in cross-origin requests) to URL’s to retrieve simple JSON data. Some of the JSON data retrieved is super simple, like so, {id:123459876, code:”frog”} [{value:”water”, contents:0}] This leads me to my…