JSHint is telling me that the value of local variable isInitOk is never read. But it is updated only if a $get success function runs and exposed with a method.
var my = function () {
var isInitOk = false;
function discoverSuccess(rsp) {
...
isInitOk = true;
}
function init() {
...
$.get(config.serverURL, discoverSuccess, 'json');
}
function assertInitOk() {
return isInitOk;
}
return {
assertInitOk: assertInitOk
};
}();