-
Notifications
You must be signed in to change notification settings - Fork 102
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
feat: add warning when int value is too large during upload #591
Conversation
src/entity.ts
Outdated
@@ -580,6 +580,15 @@ export namespace entity { | |||
|
|||
if (typeof value === 'number') { | |||
if (value % 1 === 0) { |
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.
what is the purpose of value % 1
, this seems like it could use a comment (even though it wasn't added by you).
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.
Done.
Would it be preferable to do
if (Number.isInteger(value)) {
...
}
instead? Here the method's name speaks for itself.
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.
the method name is nice 👍
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.
Swapped the logic toNumber.isInteger(value)
LGTM! |
Towards #588