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

Use local version for isInteger rather than Number.isInteger (browser compatability) #351

Merged
merged 1 commit into from
Aug 10, 2017

Conversation

jeff-phillips-18
Copy link
Contributor

No description provided.

@rodneyrehm
Copy link
Member

I'd like to avoid changing anything outside of the URI.js space, as another library could react differently because Number.isInteger() is present where it otherwise wouldn't be.

How about we (ab)use some RegExp /^[0-9]+$/.test(v) or (ab)use the modulo port % 1 === 0 on line 1068 instead? either approach should have the same effect, i.e. return false for anything but positive integers.

@jeff-phillips-18 jeff-phillips-18 changed the title fix(Number.isInteger) Add polyfill for Number.isInteger - #350 Use local version for isInteger rather than Number.isInteger (browser compatability) Aug 10, 2017
@jeff-phillips-18
Copy link
Contributor Author

Added local isInteger function, added unit tests for ensureValidPort function.

@rodneyrehm rodneyrehm merged commit 0d20f98 into medialize:master Aug 10, 2017
@rodneyrehm
Copy link
Member

thank you!
released as v1.18.12

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