Skip to content

apaleslimghost/Broca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Broca Build Status

CSON frontmatter parser.

npm install broca

Broca's area

Usage

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'}

API

broca :: String → ∀ r. { body :: String | r }

Takes a string, returns an object containing at least a body, and whatever properties it parses from the frontmatter.

Licence

MIT

About

CSON frontmatter parser.

Resources

Stars

Watchers

Forks

Packages

No packages published