Skip to content

Misleading validator name for num.isNan #138

@gphfour

Description

@gphfour

Although there is a clear JSDoc explaining what this validator does, the name of the validator itself is misleading. I expect that it would check that a value is NaN, but it actually checks if a value is of type number. This means that all valid numbers (excluding NaN) will pass this check. I thing that this validator should be named num.isNumberType and there should be another validator which checks if the value is really NaN and it could be named num.isNaN. Will submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions