# gitbook-parsers

> Includes GitBook parsers and normalize output

Latest version **0.8.9** (published 2015-12-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install gitbook-parsers
pnpm add gitbook-parsers
yarn add gitbook-parsers
bun add gitbook-parsers
```

## 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.8.9 |
| Published | 2015-12-02 |
| First published | 2015-01-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | FriendCode Inc. |
| Maintainers | samypesse |

## Links

- npm: https://www.npmjs.com/package/gitbook-parsers
- Repository: https://github.com/GitbookIO/gitbook-parsers
- Homepage: https://www.gitbook.com
- Issues: https://github.com/GitbookIO/gitbook-parsers/issues
- npm.io page: https://npm.io/package/gitbook-parsers

## Dependencies (5)

- [q](https://npm.io/package/q.md) ^1.1.2
- [lodash](https://npm.io/package/lodash.md) ^3.2.0
- [gitbook-asciidoc](https://npm.io/package/gitbook-asciidoc.md) 0.2.4
- [gitbook-markdown](https://npm.io/package/gitbook-markdown.md) 0.5.3
- [gitbook-restructuredtext](https://npm.io/package/gitbook-restructuredtext.md) 0.2.3

## Recent versions

- 0.8.9 (latest) — 2015-12-02
- 0.8.8 — 2015-12-02
- 0.8.7 — 2015-10-21
- 0.8.6 — 2015-10-21
- 0.8.5 — 2015-10-16
- 0.8.4 — 2015-10-05
- 0.8.3 — 2015-09-28
- 0.8.2 — 2015-09-10
- 0.8.1 — 2015-09-05
- 0.8.0 — 2015-09-04
- 0.7.7 — 2015-08-09
- 0.7.6 — 2015-06-02
- 0.7.5 — 2015-05-27
- 0.7.4 — 2015-04-02
- 0.7.3 — 2015-04-02
- … 19 more at https://npm.io/package/gitbook-parsers/versions

## README

# GitBook Parsers

[![NPM version](https://badge.fury.io/js/gitbook-parsers.svg)](http://badge.fury.io/js/gitbook-parsers) [![Build Status](https://travis-ci.org/GitbookIO/gitbook-parsers.png?branch=master)](https://travis-ci.org/GitbookIO/gitbook-parsers)

This Javascript module provides a low level parsing interface for GitBooks. The API is promise-based, and this module can be used in both Node.js and the Browser.

### Parsers

| Parser | Latest Version | Tests |
| ------ | ------- | ----- |
| [Markdown](https://github.com/GitbookIO/gitbook-markdown) | [![NPM version](https://badge.fury.io/js/gitbook-markdown.svg)](http://badge.fury.io/js/gitbook-markdown) | [![Build Status](https://travis-ci.org/GitbookIO/gitbook-markdown.png?branch=master)](https://travis-ci.org/GitbookIO/gitbook-markdown) |
| [AsciiDoc](https://github.com/GitbookIO/gitbook-asciidoc) | [![NPM version](https://badge.fury.io/js/gitbook-asciidoc.svg)](http://badge.fury.io/js/gitbook-asciidoc) | [![Build Status](https://travis-ci.org/GitbookIO/gitbook-asciidoc.png?branch=master)](https://travis-ci.org/GitbookIO/gitbook-asciidoc) |
| [reStructuredText](https://github.com/GitbookIO/gitbook-restructuredtext) | [![NPM version](https://badge.fury.io/js/gitbook-restructuredtext.svg)](http://badge.fury.io/js/gitbook-restructuredtext) | [![Build Status](https://travis-ci.org/GitbookIO/gitbook-restructuredtext.png?branch=master)](https://travis-ci.org/GitbookIO/gitbook-restructuredtext) |


### Usage

This module can be used in **node.js** and in the **browser**

##### In the Browser:

Include the file:

```
<script src="library/gitbook-parsers.min.js" />
```

##### In Node.js:

```
npm install gitbook-parsers
```

Then include it using:

```js
var gitbookParsers = require("gitbook-parsers");
```

##### Find a parser for a file:

```js
var parser = gitbookParsers.getForFile("FILE.md");
```

##### Use this parser:

Parse the summary:

```js
parser.summary("* [An entry](./test.md)")
.then(function(summary) { ... });
```

Parse the glossary:

```js
parser.glossary("...")
.then(function(glossary) { ... });
```

Parse the languages index:

```js
parser.langs("...")
.then(function(languages) { ... });
```

Parse a page to html:

```js
parser.page("...")
.then(function(sections) { ... });
```

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