Skip to content

Conversation

0o001
Copy link

@0o001 0o001 commented Aug 11, 2023

No description provided.

@NurimOnsemiro
Copy link

I wonder if "const x = parseFloat(value);" is also unnecessary.

@0o001
Copy link
Author

0o001 commented Aug 11, 2023

I wonder if "const x = parseFloat(value);" is also unnecessary.

I assume it's unnecessary for the following reasons:

1- Function title
... isInt(value: any): value is string ...

2- Number("1s") -> NaN
parseFloat("1s") -> 1.0

Number("1n") -> NaN
parseFloat("1n") -> 1.0

However, if this is an undesired situation, yes, this part can be changed; it would be more appropriate for authorized developers to answer.

expect(utils.isInt("1s")).to.eql(false);

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.

2 participants