// Ported from js-yaml v3.13.1:
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import { Type } from "../type.ts";

function resolveYamlMerge(data: string): boolean {
  return data === "<<" || data === null;
}

export const merge = new Type("tag:yaml.org,2002:merge", {
  kind: "scalar",
  resolve: resolveYamlMerge,
});

// denoCacheMetadata={"headers":{"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-content-type-options":"nosniff","age":"889257","cache-control":"public, max-age=31536000, immutable","etag":"\"dd6b3143bdb8d87e6821f22e137309da\"","x-jsr-backend":"modules","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=QN8oZSF%2BVwk6U7PXinDoKQ9uhzZV8Qf2dUWzwUj2Yzw6SK50%2BCFntSGcpEr53c0z2m7gXOpHI94Lmq7XSkTmJB%2FWeEtMgHFkMNUl1AIlu%2FOt9otwraCvbZc%3D\"}]}","access-control-allow-origin":"*","content-length":"509","vary":"Origin","server":"cloudflare","access-control-expose-headers":"*","date":"Tue, 28 Jul 2026 12:31:15 GMT","accept-ranges":"bytes","cross-origin-resource-policy":"cross-origin","cf-cache-status":"HIT","set-cookie":"__cf_bm=dFRjoUQlkbeOdybmjcY7U.xffzALeLxp5JXwJeTHVQs-1785241875.29922-1.0.1.1-Vpx0tzuCi2pFrS7yW8HDbpQcj2YtHnuCFbHTntlrNHgFfNHteXMp_82fjkLkCI.uiuRr7RVoICwlpBHcxZbefT.3ny2ZfijTZohuDcFR.BwsobBSE5OLEv.Zww74CxBO; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","content-type":"text/typescript","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","alt-svc":"h3=\":443\"; ma=86400","cf-ray":"a223e6589cea7db6-LAX","x-robots-tag":"noindex"},"url":"https://jsr.io/@std/yaml/0.224.3/_type/merge.ts","time":1785241875}