# broca

> frontmatter extractor

Latest version **0.1.1** (published 2014-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install broca
pnpm add broca
yarn add broca
bun add broca
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-08-09 |
| First published | 2014-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Matt Brennan |
| Maintainers | quarterto |
| Keywords | frontmatter, template, gusto, levn, yaml |

## Links

- npm: https://www.npmjs.com/package/broca
- Repository: https://github.com/quarterto/Broca
- Issues: https://github.com/quarterto/Broca/issues
- npm.io page: https://npm.io/package/broca

## Dependencies (1)

- [cson-safe](https://npm.io/package/cson-safe.md) ^0.1.1

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2014-08-09

## README

# Broca [![Build Status](https://travis-ci.org/quarterto/Broca.svg?branch=master)](https://travis-ci.org/quarterto/Broca)

Lightweight (~450 bytes unminified) CSON frontmatter parser.

```
npm install broca
```

![Broca's area](http://proxy.boxresizer.com/convert?resize=300x300&source=readingforensics.files.wordpress.com/2013/05/brocas-area-2.jpg)

## Usage
(pretending that Javascript has multiline strings)

```javascript
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. &copy; 2014 Matt Brennan.

---
_Source: https://npm.io/package/broca · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
