Skip to main content
Module

std/encoding/front_matter.ts>test

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function test
import { test } from "https://deno.land/std@0.152.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.152.0/encoding/front_matter.ts";
import { assert } from "https://deno.land/std@0.152.0/testing/asserts.ts";

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

Returns

boolean