MCPcopy Index your code
hub / github.com/volcengine/OpenViking / envBool

Function envBool

examples/codex-memory-plugin/scripts/config.mjs:58–65  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

56}
57
58function envBool(name) {
59 const v = process.env[name];
60 if (v == null || v === "") return undefined;
61 const lower = v.trim().toLowerCase();
62 if (lower === "0" || lower === "false" || lower === "no" || lower === "off") return false;
63 if (lower === "1" || lower === "true" || lower === "yes") return true;
64 return undefined;
65}
66
67function hasOwn(obj, key) {
68 return Object.prototype.hasOwnProperty.call(obj || {}, key);

Callers 1

loadConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected