Elysia Tools
Navigation
Data Formats
Environment variable examples
Environment-variable examples cover quotes, empty values and name diagnostics for Node.js dotenv parsing.
Samples
Entries inside this sample collection
Quoted hash and string values
The quoted hash is data; the outer comment is not. The flag remains text, not a Boolean.
Tags
synthetic, offline, text-operations
{
"fixture_kind": "synthetic-invalid-placeholders",
"input": "APP_LABEL=\"demo # blue\" # outside comment\nFEATURE_FLAG=false\n",
"operation": "Read using the Node.js dotenv specification; do not load into the process environment.",
"expected": {
"APP_LABEL": "demo # blue",
"FEATURE_FLAG": "false"
}
}Empty versus absent
An empty declaration still has a key. Absence is not the empty string; inherited process variables are outside this fixture.
Tags
synthetic, offline, text-operations
{
"fixture_kind": "synthetic-invalid-placeholders",
"input": "EMPTY=\"\"\nMODE=demo\n",
"operation": "Inspect only this fixture: compare EMPTY with undeclared MISSING.",
"expected": {
"EMPTY": {
"declared": true,
"value": ""
},
"MISSING": {
"declared": false
}
}
}Variable-name diagnostics
Underscores are allowed; the hyphen and space fail this Node.js name rule. This does not validate another dotenv implementation.
Tags
synthetic, offline, text-operations
{
"fixture_kind": "synthetic-invalid-placeholders",
"input": [
"APP_MODE",
"_DEMO",
"DEMO-MODE",
"DEMO MODE"
],
"operation": "Classify names using ^[a-zA-Z_]+[a-zA-Z0-9_]*$; this is a diagnostic list, not a dotenv file.",
"expected": [
true,
true,
false,
false
]
}Tools
Tools frequently paired with this sample
Related
Related sample collections
Related