Download packages/node-sdk/src/config/resolve.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 494 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/node-sdk/src/config/resolve.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/node-sdk/src/config/resolve.ts
-
curl -L -o resolve.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/node-sdk/src/config/resolve.ts
494 Bytes
| const TRUE_BOOLEAN_ENV_VALUES = new Set(['1', 'true', 'yes', 'on']); | |
| const FALSE_BOOLEAN_ENV_VALUES = new Set(['0', 'false', 'no', 'off']); | |
| export function parseBooleanEnv(value: string | undefined): boolean | undefined { | |
| const normalized = value?.trim().toLowerCase(); | |
| if (normalized === undefined || normalized.length === 0) return undefined; | |
| if (TRUE_BOOLEAN_ENV_VALUES.has(normalized)) return true; | |
| if (FALSE_BOOLEAN_ENV_VALUES.has(normalized)) return false; | |
| return undefined; | |
| } | |