for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
jsondash.api = function(){
jsondash
/** global: jsondash */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
var callbacks = {};
var my = {};
my.listCallbacks = function() {
return callbacks;
};
my.registerCallback = function(guid, cb, args) {
var cb_obj = {callback: cb, args: args};
if(!callbacks[guid]) {
callbacks[guid] = [cb_obj];
} else {
callbacks[guid].push(cb_obj);
}
my.runCallbacks = function(container, config) {
var cbs = callbacks[config.guid];
if(cbs) {
$.each(cbs, function(i, cb_config){
cb_config.callback(container, config, cb_config.args);
});
return my;
}();
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.