add isC9 to env
This commit is contained in:
@ -17,11 +17,7 @@ export var getUserAgentString = function():string{
|
||||
};
|
||||
|
||||
export var isNode = function():boolean {
|
||||
if (getEnvString() === "node"){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return getEnvString() === "node"
|
||||
};
|
||||
|
||||
export var getNodeVersion = function():string {
|
||||
@ -40,6 +36,14 @@ export var isCI = function(){
|
||||
};
|
||||
};
|
||||
|
||||
export var isC9 = function(){
|
||||
if (process.env.C9_HOSTNAME){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export var isTravis = function(){
|
||||
if(process.env.TRAVIS){
|
||||
return true;
|
||||
|
@ -9,6 +9,7 @@ export class Environment {
|
||||
nodeVersion:string;
|
||||
isCI:boolean;
|
||||
isTravis:boolean;
|
||||
isC9:boolean;
|
||||
constructor() {
|
||||
this.runtimeEnv = helpers.getEnvString();
|
||||
this.isBrowser = helpers.isBrowser();
|
||||
@ -17,5 +18,6 @@ export class Environment {
|
||||
this.nodeVersion = helpers.getNodeVersion();
|
||||
this.isCI = helpers.isCI();
|
||||
this.isTravis = helpers.isTravis();
|
||||
this.isC9 = helpers.isC9();
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user