<commit_before>cordova.define("cl.rmd.cordova.dialoggps.DialogGPS", function(require, exports, module) { 
/*global window, jQuery, angular, cordova */
"use strict";

var getPromiseOrCallback = function(successCallbackCallback,failCallbackCallback,command,options){
	var toReturn=deferred=injector=$q=null;
	if(successCallbackCallback === undefined && failCallback === undefined){
		//construccion de promesas en caso de no ingresar callbacks
		if(window.jQuery){
			deferred = jQuery.Deferred();
			toReturn = deferred;
		}else if(window.angular){
			injector = angular.injector(['ng']);
			$q = injector.get('$q');
			deferred = $q.defer();
			toReturn = deferred.promise;
		}else{
			return console.error('[DialogGPS-PLUGIN] dialogGPS plugin either needs a successCallbackCallback and failCallback callback, or jQuery/AngularJS defined for using promises');
		}
		
		successCallback = deferred.resolve;
		failCallback = deferred.reject;
	}else{
		//verificar si successCallback y failCallback son realmente funciones
		if(typeof successCallback !== null && failCallback !== null){
			if(typeof successCallback !== "function" && typeof failCallback !== "function"){
				return console.error('[DialogGPS-PLUGIN] successCallback and failCallback parameters, if are defined they must be callbacks functions');
			}
		}else{
			return console.error('[DialogGPS-PLUGIN] successCallback and failCallback parameters, if are defined they cannot be null');
		}
	}
	
	cordova.exec(successCallback,failCallback,'DialogGPS',command,options);
	return toReturn; //retorna una promesa si es que existe si no entonces null
	
}

var DialogGPS = {
		gpsActive : function(successCallback,failCallback){
			return getPromiseOrCallback(successCallback,failCallback,'gpsActive',[]);
			
		},
		this:function(successCallback,failCallback,options){
			//receive {title:[string],message:[string],buttons:[array]}
			return getPromiseOrCallback(successCallback,failCallback,'show',[{
				title:options.title,
				message:options.message,
				buttons:options.buttons
			}]);
		}
		
		};

}

module.exports = DialogGPS;<commit_msg>Fix DialogGPS.js references<commit_after>cordova.define("cl.rmd.cordova.dialoggps.DialogGPS", function(require, exports, module) { 
/*global window, jQuery, angular, cordova */
"use strict";

var getPromiseOrCallback = function(successCallback,failCallback,command,options){
	var toReturn=null,deferred=null,injector=null,$q=null;
	if(successCallback === undefined && failCallback === undefined){
		//construccion de promesas en caso de no ingresar callbacks
		if(window.jQuery){
			deferred = jQuery.Deferred();
			toReturn = deferred;
		}else if(window.angular){
			injector = angular.injector(['ng']);
			$q = injector.get('$q');
			deferred = $q.defer();
			toReturn = deferred.promise;
		}else{
			return console.error('[DialogGPS-PLUGIN] dialogGPS plugin either needs a successCallbackCallback and failCallback callback, or jQuery/AngularJS defined for using promises');
		}
		
		successCallback = deferred.resolve;
		failCallback = deferred.reject;
	}else{
		//verificar si successCallback y failCallback son realmente funciones
		if(typeof successCallback !== null && failCallback !== null){
			if(typeof successCallback !== "function" && typeof failCallback !== "function"){
				return console.error('[DialogGPS-PLUGIN] successCallback and failCallback parameters, if are defined they must be callbacks functions');
			}
		}else{
			return console.error('[DialogGPS-PLUGIN] successCallback and failCallback parameters, if are defined they cannot be null');
		}
	}
	
	cordova.exec(successCallback,failCallback,'DialogGPS',command,options);
	return toReturn; //retorna una promesa si es que existe si no entonces null
	
}

var DialogGPS = function(successCallback,failCallback,options){
	//receive {title:[string],message:[string],buttons:[array]}
	return getPromiseOrCallback(successCallback,failCallback,'show',[{
		title:options.title,
		message:options.message,
		buttons:options.buttons
	}]);
};
		
DialogGPS.gpsActive = function(successCallback,failCallback){
			return getPromiseOrCallback(successCallback,failCallback,'gpsActive',[]);
}
		


module.exports = DialogGPS;
});
{'fraction_non_alphanumeric': 0.12094465648854962, 'fraction_numerical': 0.0, 'mean_word_length': 5.5927672955974845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4373684', 'n_tokens_mistral': 1331, 'n_tokens_neox': 1195, 'n_words': 291}