penv.macro icon indicating copy to clipboard operation
penv.macro copied to clipboard

Support to map multiple keys to the same value

Open chengjianhua opened this issue 5 years ago • 1 comments

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.

chengjianhua avatar Apr 01 '19 11:04 chengjianhua

good repo!

for this issue, maybe can use RegExp:

penv({
  [/^(qatest|production)$]: 'https://example.com'
})

i will try a pr.

cbbfcd avatar Dec 30 '19 15:12 cbbfcd