MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / readEnv

Function readEnv

out/cli.cjs:70073–70081  ·  view source on GitHub ↗
(env2)

Source from the content-addressed store, hash-verified

70071 }
70072 return n2;
70073};
70074var castToError = (err) => {
70075 if (err instanceof Error)
70076 return err;
70077 return new Error(err);
70078};
70079var readEnv = (env2) => {
70080 if (typeof process !== "undefined") {
70081 return process.env?.[env2]?.trim() ?? void 0;
70082 }
70083 if (typeof Deno !== "undefined") {
70084 return Deno.env?.get?.(env2)?.trim();

Callers 1

constructorMethod · 0.85

Calls 2

trimMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected