Skip to content

Function: string()

string(configured, input, options?): string | undefined

Resolve a string: configured when non-empty, else text, else undefined.

The coercion rules are deliberately loose (on / yes / 1 are all true) because values may come from a file a human typed.

unknown

ConfigKey

ConfigOptions

string | undefined

config.string(options.host, "SMTP_HOST");