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

Truncate all number arguments (closes #746); review usage of === undefined (closes #767); review handling of arguments of wrong type #765

Merged
merged 9 commits into from Jun 7, 2018

Conversation

leshakoss
Copy link
Contributor

@leshakoss leshakoss commented May 25, 2018

  • Convert number arguments into integer number using a custom toInteger implementation

  • Change null/undefined/true/false implicit conversion strategy:

    • For required arguments:
    date number string boolean
    0 new Date(0) 0 '0' false
    '0' Invalid Date 0 '0' false
    1 new Date(1) 1 '1' true
    '1' Invalid Date 1 '1' true
    true Invalid Date NaN 'true' true
    false Invalid Date NaN 'false' false
    null Invalid Date NaN 'null' false
    undefined Invalid Date NaN 'undefined' false
    NaN Invalid Date NaN 'NaN' false
    • For optional arguments, null and undefined are treated as if argument is not provided

@leshakoss leshakoss changed the title [WIP] Truncate all number arguments (closes #746) Truncate all number arguments (closes #746); review usage of === undefined (closes #767) Jun 1, 2018
@leshakoss leshakoss requested a review from kossnocorp June 1, 2018 10:35
@leshakoss leshakoss changed the title Truncate all number arguments (closes #746); review usage of === undefined (closes #767) Truncate all number arguments (closes #746); review usage of === undefined (closes #767); review handling of arguments of wrong type Jun 6, 2018
@kossnocorp kossnocorp merged commit daddf06 into master Jun 7, 2018
@kossnocorp kossnocorp deleted the 746-round-numbers branch June 7, 2018 08:03
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