backmatter
Installation
yarn add backmatter
Usage
import {removeBackmatter, extractBackmatter} from 'backmatter';
const md = `# Hello world
\`\`\`backmatter
{"meta": "data"}
\`\`\`
`;
const backmatter = extractBackmatter(md);
// backmatter = {meta: "data"}
const removed = removeBackmatter(md);
// removed = "# Hello world\n\n"