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

Adding #42: Add options.array #43

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ianwalter
Copy link

@ianwalter ianwalter commented Jun 13, 2019

#42

@codecov-io
Copy link

codecov-io commented Jun 13, 2019

Codecov Report

Merging #43 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #43   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          94     95    +1     
=====================================
+ Hits           94     95    +1
Impacted Files Coverage Δ
index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcb1d61...4b82420. Read the comment docs.

@jorgebucaran
Copy link
Owner

Great work, @ianwalter! I'm going to run this through the benchmark before I make a decision.

Thanks!

@jorgebucaran
Copy link
Owner

jorgebucaran commented Jun 17, 2019

@ianwalter Mind sharing your benchmark results? :)

@ianwalter
Copy link
Author

getopts × 1,348,413 ops/sec
minimist × 274,594 ops/sec
yargs × 34,735 ops/sec
mri × 719,357 ops/sec

On

MacBook Pro (15-inch, 2017)
2.8 GHz Intel Core i7
16 GB 2133 MHz LPDDR3

@jorgebucaran
Copy link
Owner

@ianwalter Do you think you can update getopts.d.ts too?

@ianwalter
Copy link
Author

@ianwalter Do you think you can update getopts.d.ts too?

Sorry, was on vacation and forgot about this. Will update it now.

@ndabAP
Copy link

ndabAP commented May 5, 2020

Hey @jorgebucaran, could we merge this?

@jorgebucaran jorgebucaran self-requested a review May 5, 2020 10:14
@jorgebucaran jorgebucaran self-assigned this May 5, 2020
@jorgebucaran
Copy link
Owner

@ndabAP Docs are still missing (I did forget to request them, though). Let me see if I can manage to write them this week or over the weekend and merge this once and for all! 💯

@jorgebucaran
Copy link
Owner

jorgebucaran commented May 12, 2020

@ianwalter @ndabAP To clarify, this feature lets you specify which options must be treated as arrays, but we're still making arrays from repeated options anyway. The difference is you'd need to check if that option was an array or not yourself before trying to access it. Is this the desired behavior?

@jorgebucaran jorgebucaran changed the base branch from master to main February 15, 2021 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants