54 lines
2.8 KiB
JavaScript
54 lines
2.8 KiB
JavaScript
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
exports.getEnvString = function () {
|
||
|
if (typeof window !== 'undefined') {
|
||
|
return 'browser';
|
||
|
}
|
||
|
else if (typeof process !== 'undefined') {
|
||
|
return 'node';
|
||
|
}
|
||
|
};
|
||
|
exports.getUserAgentString = function () {
|
||
|
if (exports.isBrowser()) {
|
||
|
return navigator.userAgent;
|
||
|
}
|
||
|
else {
|
||
|
return undefined;
|
||
|
}
|
||
|
};
|
||
|
exports.isNode = function () {
|
||
|
return exports.getEnvString() === 'node';
|
||
|
};
|
||
|
exports.getNodeVersion = function () {
|
||
|
return process.version;
|
||
|
};
|
||
|
exports.isBrowser = function () {
|
||
|
return !exports.isNode();
|
||
|
};
|
||
|
exports.isCI = function () {
|
||
|
if (process.env.CI) {
|
||
|
return true;
|
||
|
}
|
||
|
else {
|
||
|
return false;
|
||
|
}
|
||
|
;
|
||
|
};
|
||
|
exports.isC9 = function () {
|
||
|
if (process.env.C9_HOSTNAME) {
|
||
|
return true;
|
||
|
}
|
||
|
else {
|
||
|
return false;
|
||
|
}
|
||
|
};
|
||
|
exports.isTravis = function () {
|
||
|
if (process.env.TRAVIS) {
|
||
|
return true;
|
||
|
}
|
||
|
else {
|
||
|
return false;
|
||
|
}
|
||
|
;
|
||
|
};
|
||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuZW52aGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LmVudmhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDVyxRQUFBLFlBQVksR0FBRztJQUN4QixFQUFFLENBQUMsQ0FBQyxPQUFPLE1BQU0sS0FBSyxXQUFXLENBQUMsQ0FBQyxDQUFDO1FBQ2xDLE1BQU0sQ0FB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