Skip to main content
Module

std/encoding/front_matter.ts>test

Deno standard library
Go to Latest
function test
import { test } from "https://deno.land/std@0.161.0/encoding/front_matter.ts";

Tests if a string has valid front matter.

Parameters

str: string

String to test.

import { test } from "https://deno.land/std@0.161.0/encoding/front_matter.ts";
import { assert } from "https://deno.land/std@0.161.0/testing/asserts.ts";

assert(test("---\ntitle: Three dashes marks the spot\n---\n"));

Returns

boolean