penv.macro
penv.macro copied to clipboard
Support to map multiple keys to the same value
Example:
const baseURL = penv({
[penv.or('develop', 'feature1', 'feature2')]: 'https://example.com'
})
It's handy for someone wishes that multiple keys map to the same value.
good repo!
for this issue, maybe can use RegExp:
penv({
[/^(qatest|production)$]: 'https://example.com'
})
i will try a pr.