Ready function wait for custom parameters

How can I customize the requirements for the ready function. I basically do not want my app to start before some variables are not loaded. There must be a standard way of doing this, no?
Thank you in advance,

You could just load your variables after platform ready, and then hide the splashscreen when everything is processed

It’s a variable from a cordova plugin, so I need to wait till the plugin is fully loaded.
I could do it with setInterval and check I guess, but I do not fully understand the dynamics of JS which does not really support concurrency, and I am thinking of a background thread solution which I do not know it fits…

I am afraid that a loop for checking whether the variable is loaded stalls the whole system.
Makes sense? I will go with a setInterval solution for a try.