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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuY2xhc3Nlcy5oZWxwZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRlbnYuY2xhc3Nlcy5oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ1csUUFBQSxZQUFZLEdBQUc7SUFDeEIsRUFBRSxDQUFDLENBQUMsT0FBTyxNQUFNLEtBQUssV0FBVyxDQUFDLENBQUMsQ0FBQztRQUNsQyxNQUFNLENBQUMsU0FBUyxDQUFBO0lBQ2xCLENBQUM7SUFBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUMsT0FBTyxPQUFPLEtBQUssV0FBVyxD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