Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lume_langdata/deps.ts>YAML.EXTENDED_SCHEMA

A Lume plugin for multi-language websites.
Go to Latest
variable YAML.EXTENDED_SCHEMA
import { YAML } from "https://deno.land/x/lume_langdata@v2.0.1/deps.ts";
const { EXTENDED_SCHEMA } = YAML;

Extends JS-YAML default schema with additional JavaScript types It is not described in the YAML specification. Functions are no longer supported for security reasons.

Examples

Example 1

import {
  EXTENDED_SCHEMA,
  parse,
} from "https://deno.land/std@0.224.0/yaml/mod.ts";

const data = parse(
  `
  regexp:
    simple: !!js/regexp foobar
    modifiers: !!js/regexp /foobar/mi
  undefined: !!js/undefined ~
# Disabled, see: https://github.com/denoland/deno_std/pull/1275
#  function: !!js/function >
#    function foobar() {
#      return 'hello world!';
#    }
`,
  { schema: EXTENDED_SCHEMA },
);

type

Schema