// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// Copyright the Browserify authors. MIT License.

export function assertPath(path?: string) {
  if (typeof path !== "string") {
    throw new TypeError(
      `Path must be a string. Received ${JSON.stringify(path)}`,
    );
  }
}

// denoCacheMetadata={"headers":{"access-control-expose-headers":"*","cf-ray":"a223e658cda47db6-LAX","accept-ranges":"bytes","x-content-type-options":"nosniff","content-type":"text/typescript","cache-control":"public, max-age=31536000, immutable","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","x-jsr-backend":"modules","vary":"Origin","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=gxkhGp7pvqOmViPerNNN%2By55tCGI15n0xq%2FUYOIQK0Ssmc4oXYByBxsTn0FrCSSGYeVrJNMvDSXchoEZk25yRbJy%2FQvsXrMp69WUqI9CamjRRtCvVkf%2B7yc%3D\"}]}","access-control-allow-origin":"*","age":"197965","etag":"\"9a29f51620a38baa22138ef689ca93ae\"","server":"cloudflare","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';","date":"Tue, 28 Jul 2026 12:31:15 GMT","cf-cache-status":"HIT","set-cookie":"__cf_bm=T8gaRfkGfJ_pyHJn5JcwW3zVTx5FmDMBkVOnajT6pbk-1785241875.339167-1.0.1.1-uvGT1S6SF69xWaLwVNp5dTQBlZHF_wY81WT1T.UxMfFArNMGGueiWIUYc34yobcJKLVsD_YEXF5ifQjV2ZHUJu0v9pIEPdcj4fmf80xSr1xyYqBESEC.dYrjH5D3j5aS; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","x-robots-tag":"noindex","cross-origin-resource-policy":"cross-origin","content-length":"307","alt-svc":"h3=\":443\"; ma=86400"},"url":"https://jsr.io/@std/path/1.0.0-rc.2/_common/assert_path.ts","time":1785241875}