diff --git a/dist/angular-environment.js b/dist/angular-environment.js index 319f3b4..170dc34 100644 --- a/dist/angular-environment.js +++ b/dist/angular-environment.js @@ -118,7 +118,8 @@ angular.module('environment', []). if (location === v.domain) { keepGoing = false; } - console.log(v.domain); + + void 0; self.environment = v.environment; } }); diff --git a/dist/angular-environment.min.js b/dist/angular-environment.min.js index 5097619..7778b81 100644 --- a/dist/angular-environment.min.js +++ b/dist/angular-environment.min.js @@ -2,4 +2,4 @@ angular.module('environment',[]).provider('envService',function(){'use strict';var local={};local.pregQuote=function(string,delimiter){return(string+'').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\'+(delimiter||'')+'-]','g'),'\\$&');};local.stringToRegex=function(string){return new RegExp(local.pregQuote(string).replace(/\\\*/g,'.*').replace(/\\\?/g,'.'),'g');};this.environment='development';this.data={};this.config=function(config){this.data=config;};this.set=function(environment){this.environment=environment;};this.get=function(){return this.environment;};this.read=function(variable){if(typeof variable==='undefined'||variable===''||variable==='all'){return this.data.vars[this.get()];} else if(typeof this.data.vars[this.get()][variable]==='undefined'){return this.data.vars.defaults[variable];} return this.data.vars[this.get()][variable];};this.is=function(environment){return(environment===this.environment);};this.check=function(){var self=this,location=window.location.host,matches=[],keepGoing=true;angular.forEach(this.data.domains,function(v,k){angular.forEach(v,function(v){if(location.match(local.stringToRegex(v))){matches.push({environment:k,domain:v});}});});angular.forEach(matches,function(v,k){if(keepGoing){if(location===v.domain){keepGoing=false;} -console.log(v.domain);self.environment=v.environment;}});};this.$get=function(){return this;};}); \ No newline at end of file +void 0;self.environment=v.environment;}});};this.$get=function(){return this;};}); \ No newline at end of file diff --git a/src/angular-environment.js b/src/angular-environment.js index 319f3b4..ba4379c 100644 --- a/src/angular-environment.js +++ b/src/angular-environment.js @@ -118,6 +118,7 @@ angular.module('environment', []). if (location === v.domain) { keepGoing = false; } + console.log(v.domain); self.environment = v.environment; }