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: allow specifying the same option multiple times using an array #26

Merged
merged 2 commits into from Nov 12, 2020

Conversation

YoshiWalsh
Copy link
Contributor

Closes #25.

I haven't added any test coverage for this, sorry. Based on the current test suite I think it would be hard to do. If you'd like me to add tests I think I'll have to bring in ffprobe and ffprobe-static as devDependencies.

I have tested this in my own application using npm link though, and it's working for my requirements.

A more DRY way of implementing this feature would be to make value always an array using a ternary expression, but I think the way I've implemented it makes the intent more obvious when reading the code. If you want me to change it to be more DRY I'm happy to do so.

YoshiWalsh added a commit to YoshiWalsh/subtitle-indexer that referenced this pull request Nov 3, 2020
This requires changes which have yet to be merged in an upstream project: phaux/node-ffmpeg-stream#26

You will need to manually build and install JoshuaWalsh/node-ffmpeg-stream#feature/issue-25 to use this branch.
@YoshiWalsh
Copy link
Contributor Author

Hi @phaux , if you have a chance could you please review this? I'd love to see this functionality included in the npm version.

@phaux
Copy link
Owner

phaux commented Nov 12, 2020

Sorry for not responding for so long. It looks like the CI doesn't pass but it doesn't show the status here for some reason. I'm gonna merge this anyways and then publish a new version.

@phaux phaux changed the title Allow specifying the same option multiple times using an array feat: allow specifying the same option multiple times using an array Nov 12, 2020
@phaux phaux merged commit bd75cac into phaux:master Nov 12, 2020
@YoshiWalsh
Copy link
Contributor Author

If you have any suggestions of how I can add test coverage for this I would be happy to do so.

@phaux
Copy link
Owner

phaux commented Nov 13, 2020

It's fine. I will publish a new version after the CI turns green.

@phaux
Copy link
Owner

phaux commented Nov 13, 2020

Published!

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.

Impossible to specify multiple map parameters
2 participants