How to use Dropconfig from a JavaScript / TypeScript / EcmaScript application

ES6 JSON

const req = await fetch("https://a.dropconfig.com/🔑.json");
const data = await req.json();

If you are using Axios

const config_object = await axios.Get("https://a.dropconfig.com/🔑.json")

Older javascript versions

function getConfig(key, callback){
  var oReq = new XMLHttpRequest();

  oReq.addEventListener("load", function(){
      var data = JSON.stringify(this.responseText);
      callback(data);
  });
  oReq.open("GET", "https://a.dropconfig.com/"+key+".json");
  oReq.send();
}

getConfig(🔑, function(data){
    //Your config
})