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

Throw error for invalid ports #20

Merged
merged 2 commits into from
Oct 15, 2019
Merged

Throw error for invalid ports #20

merged 2 commits into from
Oct 15, 2019

Conversation

sammacbeth
Copy link
Contributor

If the port specified in the URL is not numeric, or greater than 2^16, the URL constructor should throw. This PR adds checks for these cases.

Fixes #5. Adds test to verify #6 is working.

lib/url.ts Outdated Show resolved Hide resolved
@remusao remusao merged commit d8cdb5e into master Oct 15, 2019
@sammacbeth sammacbeth deleted the issue_5 branch October 15, 2019 14:27
@remusao remusao added the PR: Bug Fix 🐛 Increment patch version when merged label Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Bug Fix 🐛 Increment patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fails to detect invalid URL
2 participants