Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to map multiple keys to the same value #2

Open
chengjianhua opened this issue Apr 1, 2019 · 1 comment
Open

Support to map multiple keys to the same value #2

chengjianhua opened this issue Apr 1, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@chengjianhua
Copy link
Owner

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 chengjianhua pinned this issue Apr 1, 2019
@chengjianhua chengjianhua self-assigned this Apr 1, 2019
@chengjianhua chengjianhua added the enhancement New feature or request label Apr 1, 2019
@cbbfcd
Copy link

cbbfcd commented Dec 30, 2019

good repo!

for this issue, maybe can use RegExp:

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

i will try a pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants