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

Added feature normalized url #2260

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Raju-kadel-27
Copy link

There was a feature request for normalizeUrl() function. I came to know about this feature issue and made some contributions.
[ Add normalizeURL() method https://github.com//issues/638 ]

const options = {
defaultProtocol: 'https',
removeWWW: true,
removeAuth: true,
removePort: true,
removeHash: true,
requireHttp: false,
requireHttps: true,
removeQuery: true,
removeTrailingSlash: true,
removeDirectoryIndex: ['about.html'],
removeEndSlash: true,
sortQueryParameters: true
};

So these are the options available to pass along inputUrl in normalizeUrl function i.e.
const normalized = normalizeUrl (inputURL, options) ;

I have not added test cases yet. Waiting for your responses and feedback so that i can contribute later.

@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (f074abd) 99.95% compared to head (9e56689) 99.95%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2260   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         107      107           
  Lines        2436     2436           
  Branches      615      615           
=======================================
  Hits         2435     2435           
  Partials        1        1           
Files Changed Coverage Δ
src/lib/isPassportNumber.js 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Raju-kadel-27
Copy link
Author

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.

1 participant