appendNodeOption
Appends a single node CLI option to a NODE_OPTIONS string, preserving any options already present.
Import:
import { appendNodeOption } from 'obsidian-dev-utils/script-utils/exec';Signature:
function appendNodeOption(existingNodeOptions: string | undefined, option: string): stringParameters:
| Parameter | Type | Description |
|---|---|---|
existingNodeOptions | string | undefined | The current NODE_OPTIONS value (e.g. process.env.NODE_OPTIONS), if any. |
option | string | The node CLI option to append (e.g. --localstorage-file=:memory:). |
Returns: string — The combined NODE_OPTIONS string. If option is already present, the value is returned unchanged.