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

import { _format, assertArg } from "../_common/format.ts";
import type { FormatInputPathObject } from "../_interface.ts";

/**
 * Generate a path from `FormatInputPathObject` object.
 * @param pathObject with path
 */
export function format(pathObject: FormatInputPathObject): string {
  assertArg(pathObject);
  return _format("/", pathObject);
}

// denoCacheMetadata={"headers":{"access-control-expose-headers":"*","server":"cloudflare","age":"3393906","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';","access-control-allow-origin":"*","cache-control":"public, max-age=31536000, immutable","x-content-type-options":"nosniff","set-cookie":"__cf_bm=EJE9uzIAHpecC2lwaBrkmBXCnRnHleGislV4tImW9ik-1785241875.2550573-1.0.1.1-T_IkbE26JtwBreN09HcdxkjhkVilNj54RsQlrSWuaaliMH24oWfCMiIEwEose6YAMPZYYpsrzMEy3Y3pK0LQYJR_9w4m0RzhCyGEtH4__9ICIUEZ9SowXFqzWyRY7n_q; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=GRB1Ox9d%2BrwN23hNyR86MSXz8OQ1MsV6xWYXgWvJ5QQh4Fb0Am%2BvQcTp%2BVbxEtYrDLEUOgsCYwyxdLtuaBvWKZ0Y1%2BQ0oHDLfPW1nitgztgOkCmP4ps7iC8%3D\"}]}","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","accept-ranges":"bytes","x-jsr-backend":"modules","cf-cache-status":"HIT","date":"Tue, 28 Jul 2026 12:31:15 GMT","x-robots-tag":"noindex","content-length":"462","vary":"Origin","cf-ray":"a223e6585c027db6-LAX","alt-svc":"h3=\":443\"; ma=86400","content-type":"text/typescript","cross-origin-resource-policy":"cross-origin","etag":"\"fea836a71324b17badb8814418754463\""},"url":"https://jsr.io/@std/path/0.224.0/posix/format.ts","time":1785241875}