// 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 { Type } from "../_type.ts";

export const nil: Type<"scalar", null> = {
  tag: "tag:yaml.org,2002:null",
  kind: "scalar",
  defaultStyle: "lowercase",
  predicate: (object: unknown): object is null => object === null,
  construct: () => null,
  resolve: (data: string): boolean => {
    return (
      data === "~" ||
      data === "null" ||
      data === "Null" ||
      data === "NULL"
    );
  },
  represent: {
    lowercase: (): string => "null",
    uppercase: (): string => "NULL",
    camelcase: (): string => "Null",
  },
};

// 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';","cross-origin-resource-policy":"cross-origin","access-control-expose-headers":"*","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=T2s2AR6hi%2FsjySVyE62TXAJHa%2FVYlxj1dXq%2BoJSv4Jwfis1TU%2FCgu8Epia%2FioKC14ZKdfzaMXv5pMjCjSjg8mvyFlZUV97aUDboRrF8%2B0ZI%2FIivFHSKpjXo%3D\"}]}","server":"cloudflare","vary":"Origin","cf-ray":"a223e6590e4b7db6-LAX","content-type":"text/typescript","alt-svc":"h3=\":443\"; ma=86400","x-content-type-options":"nosniff","etag":"\"9803f56e8dc1c134dba3708722290025\"","access-control-allow-origin":"*","x-jsr-backend":"modules","date":"Tue, 28 Jul 2026 12:31:15 GMT","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","set-cookie":"__cf_bm=UOtIURRybU3YTdyV0Y4czLwL4y2DY0YxEG_Z89xzLJU-1785241875.3716812-1.0.1.1-Mruu20OWxjwzgg7Tv6qaSNRgUhs6b5edYdqn2_hcHBGBdUT8kqQiIHif4mRPj9mWb687zFCN4JARYzMKQRtOxm49QHNXdjfBy087QaD4hUjuxF_siY6GnCYawbuSSGuF; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","age":"2742713","accept-ranges":"bytes","x-robots-tag":"noindex","cache-control":"public, max-age=31536000, immutable","cf-cache-status":"HIT","content-length":"818"},"url":"https://jsr.io/@std/yaml/1.0.5/_type/nil.ts","time":1785241875}