// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { assertPath } from "./assert_path.ts";

export function assertArg(path: string) {
  assertPath(path);
  if (path.length === 0) return ".";
}

// denoCacheMetadata={"headers":{"vary":"Origin","content-length":"263","content-type":"text/typescript","server":"cloudflare","x-robots-tag":"noindex","cache-control":"public, max-age=31536000, immutable","date":"Tue, 28 Jul 2026 12:31:15 GMT","alt-svc":"h3=\":443\"; ma=86400","cf-cache-status":"HIT","x-jsr-backend":"modules","cross-origin-resource-policy":"cross-origin","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","accept-ranges":"bytes","access-control-expose-headers":"*","set-cookie":"__cf_bm=PWybDpfD_LZLszXhcX6PM9AocUPprMf.t3PhclzxxD8-1785241875.2815378-1.0.1.1-YuXZa.7ZGlAL21EFgU.Pp1eTDcyyLjiOiR0dzey0.4dlv8xab4EQrSMvNLdLOz6DbehzKFhdfKgbKV0Fz_GAwra2G9HHQgI6cQcHzSvHXFCsEiuf2Im1LpMa4jQv6c.n; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","x-content-type-options":"nosniff","cf-ray":"a223e6587c897db6-LAX","etag":"\"99de9b3a5dbad98f43d09b2cc6eecd0f\"","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=%2FufYz2ebbjCHTNNFw2zLfmG967utH77RrOs2G%2FqBdUKoAR8sKrJYzNM%2BrutP8fLCyEWCnvOBrWmuo%2BDZNYy4Zeo9PmJBSzv5Sg1w85SmKofqv%2FS9jM7g%2FNM%3D\"}]}","age":"44352","access-control-allow-origin":"*","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';"},"url":"https://jsr.io/@std/path/0.224.0/_common/dirname.ts","time":1785241875}