Closed theartoflogic closed 8 years ago
I need to be able to pass in options
to toInt()
and isInt()
to support a PR I've created for the validator
library (https://github.com/chriso/validator.js/pull/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.
thanks
Should I also update the README, or is that done when a new version is released?
thanks ,that's my fault
This PR adds the ability to pass
options
to both theisInt()
andtoInt()
functions. Along with theoptions
, you can now also pass aradix
totoInt()
.