Skip to main content

Built and signed on GitHub Actions

Get the metadata in markdown

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a year ago (0.0.0)

markmeta

Get the metadata in markdown

import { splitMarkdown } from "@games/markmeta";

// Returns [metadata object, metadata text, content after metadata]
splitMarkdown(`---
title: Title
---

## content
`);
// [{ title: "Title" }, "---\ntitle: Title\n---", "\n\n## content\n"]

splitMarkdown(`---
{
  "title": "Title"
}
---

## content
`);
// [{ title: "Title" }, `---\n{\n  "title": "Title"\n}\n---`, "\n\n## content\n"]

splitMarkdown(`+++
title= Title
+++

## content
`);
// [{ title: "Title" }, `+++\ntitle= Title\n+++`, "\n\n## content\n"]
Built and signed on
GitHub Actions
View transparency log

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@games/markmeta

Import symbol

import * as markmeta from "@games/markmeta";
or

Import directly with a jsr specifier

import * as markmeta from "jsr:@games/markmeta";

Add Package

pnpm i jsr:@games/markmeta
or (using pnpm 10.8 or older)
pnpm dlx jsr add @games/markmeta

Import symbol

import * as markmeta from "@games/markmeta";

Add Package

yarn add jsr:@games/markmeta
or (using Yarn 4.8 or older)
yarn dlx jsr add @games/markmeta

Import symbol

import * as markmeta from "@games/markmeta";

Add Package

npx jsr add @games/markmeta

Import symbol

import * as markmeta from "@games/markmeta";

Add Package

bunx jsr add @games/markmeta

Import symbol

import * as markmeta from "@games/markmeta";