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

(suggestion) Remove sub directories #188

Open
MortezaHeydari97 opened this issue May 29, 2024 · 4 comments
Open

(suggestion) Remove sub directories #188

MortezaHeydari97 opened this issue May 29, 2024 · 4 comments

Comments

@MortezaHeydari97
Copy link

Hi,
Sometimes we need the pure domain only.
So I've a new suggestion to implement a new option to remove sub directories of the URL.

@sindresorhus
Copy link
Owner

sindresorhus commented May 31, 2024

Yeah, there could be a removePath option that defaults to false.

@MortezaHeydari97
Copy link
Author

Yes, I'm agree.
Ok then, I will send the PR

@millette
Copy link
Contributor

Related to #190 but I only wanted to remove certain sub directories.

@sindresorhus
Copy link
Owner

I think we could let it also accept a function that is provided the path components and is expected to return the new path components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants