MCPcopy Create free account
hub / github.com/ResearAI/DeepScientist / parseBooleanSetting

Function parseBooleanSetting

bin/ds.js:741–755  ·  view source on GitHub ↗
(rawValue, fallback = false)

Source from the content-addressed store, hash-verified

739}
740
741function parseBooleanSetting(rawValue, fallback = false) {
742 if (typeof rawValue === 'boolean') {
743 return rawValue;
744 }
745 const normalized = String(rawValue || '')
746 .trim()
747 .toLowerCase();
748 if (['true', 'yes', 'on', '1'].includes(normalized)) {
749 return true;
750 }
751 if (['false', 'no', 'off', '0'].includes(normalized)) {
752 return false;
753 }
754 return fallback;
755}
756
757function shouldCompileRuntimeBytecode() {
758 return parseBooleanSetting(process.env.DEEPSCIENTIST_RUNTIME_COMPILE_BYTECODE, false);

Callers 3

readConfiguredUiAddressFunction · 0.85

Calls 1

trimMethod · 0.45

Tested by

no test coverage detected