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