Parse comma-separated values into arrays.
Currently it's only possible to do with stringified JSON array
LOG_LEVELS=["error","warning"]
@Env<string[]>('LOG_LEVELS', {parseJson: true)
readonly logLevels: string[]
This should work too:
@Env<string[]>('LOG_LEVELS', {parseArray: true)
readonly logLevels: string[]
We should maybe also add custom delimiters:
@Env<string[]>('LOG_LEVELS', {delimiter: ';'})
readonly logLevels: string[]
Parse comma-separated values into arrays.
Currently it's only possible to do with stringified JSON array
This should work too:
We should maybe also add custom delimiters: