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

Add ability to pass options to isInt() and toInt() #23

Merged
merged 1 commit into from
May 28, 2016

Conversation

theartoflogic
Copy link
Contributor

This PR adds the ability to pass options to both the isInt() and toInt() functions. Along with the options, you can now also pass a radix to toInt().

@coveralls
Copy link

coveralls commented May 27, 2016

Coverage Status

Coverage increased (+0.2%) to 96.088% when pulling c602b0a on theartoflogic:feature/int-options into 1852a5c on RocksonZeta:master.

@theartoflogic
Copy link
Contributor Author

I need to be able to pass in options to toInt() and isInt() to support a PR I've created for the validator library (validatorjs/validator.js#532). That PR adds the allow_leading_zeroes option to isInt(), which fixes an issue I'm having trying to validate integers that have leading zeroes.

However, even if that PR is ultimately not merged, this PR would still be valid, since there are other options already exposed in the isInt() and toInt() functions in the validator library that are not exposed in this library.

@RocksonZeta RocksonZeta merged commit 27470bd into RocksonZeta:master May 28, 2016
@RocksonZeta
Copy link
Owner

thanks

@theartoflogic
Copy link
Contributor Author

Should I also update the README, or is that done when a new version is released?

@RocksonZeta
Copy link
Owner

thanks ,that's my fault

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.

3 participants