@hyperlane-xyz/utils
Version:
General utilities and types for the Hyperlane network
17 lines • 499 B
JavaScript
// Should be used instead of referencing process directly in case we don't
// run in node.js
export function safelyAccessEnvVar(name, toLowerCase = false) {
try {
return toLowerCase ? process.env[name]?.toLowerCase() : process.env[name];
}
catch {
return undefined;
}
}
export function inCIMode() {
return process.env.CI === 'true';
}
export function inKubernetes() {
return process.env.KUBERNETES_SERVICE_HOST !== undefined;
}
//# sourceMappingURL=env.js.map