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
Implementation for lt$, lte$, gt$, gte$ rules (See #3) #12
Conversation
…s resolved (See rjrodger#3)
} | ||
|
||
function castToNumber( val ) { | ||
if( _.isNumber(val) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
castToNumber is not neccessary - JavaScript gives "good" values for <,>,<=,>= for all types - so we can generalize to strings, etc pure Date objects also work just fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"bad habits" from strongly typed languages. I will remove this function and check the tests.
Implementation for lt$, lte$, gt$, gte$ rules (See #3)
Internal validation rules for are commented out because they need #1 to be implemented.