litefs
litefs copied to clipboard
Advanced Variable Expansion
Per suggestion from @kentcdodds, this issue exists to describe additional operators in variable expansion.
The initial suggestion is for a "includes" operator. Environment variables don't necessarily have a format (e.g. CSV) so it might make more sense to have a CONTAINS
operator instead.
Usage
Possible formats for usage:
${"den,maa" CONTAINS FLY_REGION}
${CONTAINS("den,maa", FLY_REGION)}
Alternatives
Another option could be to implement a regex operator to make it more flexible:
${"den,maa" ~= FLY_REGION}
Maybe that's more confusing though. ¯\_(ツ)_/¯