Skip to main content
This package has been archived, and as such it is read-only.

@std/url@0.225.1
Built and signed on GitHub Actions

DEPRECATED: now use path APIs directly

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 months ago (0.225.1)
Deprecated

Use functions from @std/path/posix instead (examples included). @std/url will be removed in the future.

Utilities for working with URLs.

import { basename, join, normalize } from "@std/url";
import { assertEquals } from "@std/assert";

const url = new URL("https:///deno.land///std//assert//.//mod.ts");
const normalizedUrl = normalize(url);

assertEquals(normalizedUrl.href, "https://deno.land/std/assert/mod.ts");
assertEquals(basename(normalizedUrl), "mod.ts");

const joinedUrl = join(normalizedUrl, "..", "..", "async", "retry.ts");

assertEquals(joinedUrl.href, "https://deno.land/std/async/retry.ts");
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@std/url

Import symbol

import * as url from "@std/url";

---- OR ----

Import directly with a jsr specifier

import * as url from "jsr:@std/url";

Add Package

npx jsr add @std/url

Import symbol

import * as url from "@std/url";

Add Package

yarn dlx jsr add @std/url

Import symbol

import * as url from "@std/url";

Add Package

pnpm dlx jsr add @std/url

Import symbol

import * as url from "@std/url";

Add Package

bunx jsr add @std/url

Import symbol

import * as url from "@std/url";