CSON frontmatter parser.
npm install broca
var broca = require('broca');
var str = `
---
a: 1
b: 'hello'
c: [1, 2, 3]
---
hello world
`;
broca(str); //⇒ {a: 1, b:'hello', c:[1,2,3], body:'hello world'}
Takes a string, returns an object containing at least a body
, and whatever properties it parses from the frontmatter.
MIT