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

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

export const str: Type<"scalar", string> = {
  tag: "tag:yaml.org,2002:str",
  kind: "scalar",
  resolve: (): boolean => true,
  construct: (data: string | null): string => data !== null ? data : "",
};

// denoCacheMetadata={"headers":{"set-cookie":"__cf_bm=iN7HU9Z2cdEjjulYW8s1ymWUPyXtsMPgj1jlOPA5D.k-1785241875.3756094-1.0.1.1-cydyRDZCsw5iTISMNmCBUv7ivHuWi0_xWsATZGCKTbs_BHYw3SOHxoM5P.WkhkZbtyYuYuEFmQ_jYOCg__JCs5copXZ2wIeWguozzlVNSBB8Ubr4w1xpnI8qQqpYyKhT; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","cf-cache-status":"HIT","age":"50701","etag":"\"bca844df328dae8364231d256396c6c9\"","content-type":"text/typescript","accept-ranges":"bytes","content-length":"438","access-control-expose-headers":"*","x-content-type-options":"nosniff","cross-origin-resource-policy":"cross-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';","alt-svc":"h3=\":443\"; ma=86400","server":"cloudflare","cache-control":"public, max-age=31536000, immutable","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=8gYITjiQ1COyOa5%2BQuc3lwgbTW8iZkydQ%2FqzT3%2Fj%2FcnM1o72Bng9njyhRf0t6YzMo1NqPTIdJb5y4NkG6JNjYYS9rTcEjobZAqekS7cwl3Kp5a029Unz5mQ%3D\"}]}","date":"Tue, 28 Jul 2026 12:31:15 GMT","access-control-allow-origin":"*","x-robots-tag":"noindex","x-jsr-backend":"modules","vary":"Origin","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","cf-ray":"a223e6590e647db6-LAX"},"url":"https://jsr.io/@std/yaml/1.0.5/_type/str.ts","time":1785241875}