# xecio-front-matter

> Front-matter parser for Xecio.

Latest version **0.1.0** (published 2016-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install xecio-front-matter
pnpm add xecio-front-matter
yarn add xecio-front-matter
bun add xecio-front-matter
```

## 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.0 |
| Published | 2016-02-04 |
| First published | 2016-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Damien Wright |
| Maintainers | dww510 |
| Keywords | front-matter, front matter, yaml, yml, xecio, json |

## Links

- npm: https://www.npmjs.com/package/xecio-front-matter
- Repository: https://github.com/xeciojs/xecio-front-matter
- Homepage: https://github.com/xeciojs/xecio-front-matter#readme
- Issues: https://github.com/xeciojs/xecio-front-matter/issues
- npm.io page: https://npm.io/package/xecio-front-matter

## Dependencies (1)

- [js-yaml](https://npm.io/package/js-yaml.md) ^3.4.6

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-02-04

## README

# xecio-front-matter

[![Build Status](https://travis-ci.org/xeciojs/xecio-front-matter.svg?branch=master)](https://travis-ci.org/xeciojs/xecio-front-matter)  [![NPM version](https://badge.fury.io/js/xecio-front-matter.svg)](http://badge.fury.io/js/xecio-front-matter) [![Coverage Status](https://coveralls.io/repos/xeciojs/xecio-front-matter/badge.svg?branch=master)](https://coveralls.io/r/xeciojs/xecio-front-matter?branch=master)

Front-matter parser.

## What is Front-matter?

Front-matter allows you to specify data at the top of a file. Here're two formats:

**YAML front-matter**

```
---
layout: false
title: "Hello world"
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
```

**JSON front-matter**

```
;;;
"layout": false,
"title": "Hello world"
;;;
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
```

Prefixing separators are optional.

## API

### parse(str, [options])

Parses front-matter.

### stringify(obj, [options])

Converts an object to a front-matter string.

Option | Description | Default
--- | --- | ---
`mode` | The mode can be either `json` or `yaml`. | `yaml`
`separator` | Separator | `---`
`prefixSeparator` | Add prefixing separator. | `false`

### split(str)

Splits a YAML front-matter string.

### escape(str)

Converts hard tabs to soft tabs.

## License

MIT

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