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

feat: support array-type #1

Merged
merged 4 commits into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs: fix dot-nested example
  • Loading branch information
privatenumber committed Dec 6, 2021
commit 657fb888d1b1ead32fed36660b9825ced4e202d0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function EnvObject(value: string): Env {
}

const parsed = typeFlag(process.argv.slice(2), {
env: EnvObject,
env: [EnvObject],
});

const env = parsed.flags.env.reduce((agg, next) => Object.assign(agg, next), {});
Expand Down
2 changes: 1 addition & 1 deletion examples/dot-nested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function EnvironmentObject(value: string): Environment {
}

const parsed = typeFlag(process.argv.slice(2), {
env: EnvironmentObject,
env: [EnvironmentObject],
});

// eslint-disable-next-line unicorn/no-array-reduce,unicorn/prefer-object-from-entries
Expand Down