filterByNamespace
filterByNamespace(
raw,namespace):Record<string,string|undefined>
Defined in: utils/filter-by-namespace.ts:12
Filter raw env vars to only those matching a namespace prefix, stripping the prefix from each key before returning.
Case-insensitive: “holocron_debug” and “HOLOCRON_DEBUG” both match namespace “HOLOCRON”.
Parameters
Section titled “Parameters”Record<string, string | undefined>
namespace
Section titled “namespace”string
Returns
Section titled “Returns”Record<string, string | undefined>
Example
Section titled “Example”filterByNamespace({ HOLOCRON_DEBUG: "true", PORT: "3000" }, "HOLOCRON")// → { DEBUG: "true" }