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

Revision 0.32.26 #851

Merged
merged 3 commits into from Apr 27, 2024
Merged

Revision 0.32.26 #851

merged 3 commits into from Apr 27, 2024

Conversation

sinclairzx81
Copy link
Owner

@sinclairzx81 sinclairzx81 commented Apr 27, 2024

This PR implements a minor optimization on number checking using only Number.isFinite(x) and omits the typeof x === 'number'. This update reduces the number check to a singular function call. This update also applies a similar change to integer checking where only Number.isInteger(x) is used. Note that TypeSystemPolicy.AllowNaN = true will return the check to typeof x === 'number' for Number types only.

This optimization was suggested by https://github.com/aquapi

Additional updates include small fix to the TemplateLiteral comment in the readme, and a minor update to the overview copy.

@sinclairzx81 sinclairzx81 merged commit a670487 into master Apr 27, 2024
18 checks passed
@sinclairzx81 sinclairzx81 deleted the number branch April 27, 2024 07:15
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

1 participant