-
Notifications
You must be signed in to change notification settings - Fork 632
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
Add std/url with URL utilities #3515
Comments
Good to know that my analysis was not completely off-base 😅 |
index.ts import { parse } from "https://deno.land/std/path/mod.ts";
const url = new URL("https://deno.land/std@0.197.0/console/mod.ts");
console.log(parse(url.toString())); console output
|
@tr1ckydev If the platform is windows, import { join } from "https://deno.land/std/path/win32.ts";
const url = new URL("https://deno.land/std@0.197.0/console/mod.ts");
console.log(join(url.toString(), "foo")); // => https:\deno.land\std@0.197.0\console\mod.ts\foo |
Ahh, I see. Is |
I don't think anybody started working on it. Which APIs are you planning to implement? Could you share the API designs first? |
I have tried to keep the API design similar to std/path with only difference being the input for the functions are |
Also, I have started writing the tests for the functions, and they are working very promising so far. |
You should be able to copy most if not all of the code from the IMO, the only useful utilities would be const url = new URL("../fr", "https://test.com/en-us") As for |
Yes, I am using posix functions from
Here's something to say. I have implemented
Agreed.
How about |
Is there a usecase for this? I feel like we should be pretty conservative about what we include in std.
Again, see above.
Pretty strongly against this. I think |
Okay, I get it. Then they can be omitted.
Sounds great. I will be keeping join only then. |
I really like the idea of this module, as I often use the posix path fns for this, but having these use the existing path modules (v0.198.0) introduces unnecessary overhead from the windows implementations. I've proposed a modification of the path modules structure that could alleviate this... https://github.com/denoland/deno_std/discussions/3553 |
Should have similar functionality to path: parent, basename, ext
but operate on JS native URL objects
The text was updated successfully, but these errors were encountered: