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

Fix: Invalid parameter with single page number as string. #89

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

Furkangunduz
Copy link
Contributor

@Furkangunduz Furkangunduz commented Aug 15, 2022

I just extend the add function from under the pdf merge. And create test by copying other tests. Now able to add by parameter as string.

Invalid parameter with single page number as string.
@mojoaxel
Copy link
Collaborator

Thank you very much for your contribution!

  • Please check again your indentation.
  • run npm run standard
  • Also I would move the regex-check to the end of the if-else chain because regex are quite "expensive".
  • Could you maybe also implement the possibility to give plain numbers!?
    Something like this: add(inputFile, 3)

I'll try to merge as soon as I have access to a real computer (I'm on vacation).

Invalid parameter with single page number as plain numbers.
@Furkangunduz
Copy link
Contributor Author

Hello ,
I edited my code. I moved the regex end of the if-else chain , add new if else to check if parameter "pages" is number and add test for plain numbers.

it was a pleasure a helping. Have fun on your vacation.

Copy link
Collaborator

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx! LGTM

@mojoaxel mojoaxel merged commit b721418 into nbesli:master Aug 25, 2022
mojoaxel added a commit to fllstx/pdf-merger-js that referenced this pull request Aug 26, 2022
mojoaxel added a commit to fllstx/pdf-merger-js that referenced this pull request Aug 26, 2022
mojoaxel added a commit that referenced this pull request Aug 26, 2022
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

2 participants