# mkref

> Link reference collation

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

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2016-04-02 |
| First published | 2016-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | muji |
| Maintainers | muji |
| Keywords | markdown, commonmark, ast, transform, stream, inject, link, reference |

## Links

- npm: https://www.npmjs.com/package/mkref
- Repository: https://github.com/mkdoc/mkref
- Homepage: https://github.com/mkdoc/mkref#readme
- Issues: https://github.com/mkdoc/mkref/issues
- npm.io page: https://npm.io/package/mkref

## Dependencies (2)

- [mkast](https://npm.io/package/mkast.md) ~1.2.2
- [through3](https://npm.io/package/through3.md) ~1.1.5

## Recent versions

- 1.0.8 (latest) — 2016-04-02
- 1.0.7 — 2016-03-22
- 1.0.5 — 2016-03-21
- 1.0.4 — 2016-03-21
- 1.0.3 — 2016-03-18
- 1.0.2 — 2016-03-18

## README

# Link References

[![Build Status](https://travis-ci.org/mkdoc/mkref.svg?v=3)](https://travis-ci.org/mkdoc/mkref)
[![npm version](http://img.shields.io/npm/v/mkref.svg?v=3)](https://npmjs.org/package/mkref)
[![Coverage Status](https://coveralls.io/repos/mkdoc/mkref/badge.svg?branch=master&service=github&v=3)](https://coveralls.io/github/mkdoc/mkref?branch=master)

> Collect link references

Collates link references from all documents in the stream and flushes a paragraph with the link references at the end of the stream.

## Install

```
npm i mkref --save
```

For the command line interface install [mkdoc][] globally (`npm i -g mkdoc`).

---

- [Install](#install)
- [Usage](#usage)
- [Help](#help)
- [API](#api)
  - [ref](#ref)
    - [Options](#options)
- [License](#license)

---

## Usage

Create the stream and write a [commonmark][] document:

```javascript
var ref = require('mkref')
  , ast = require('mkast');
ast.src('[example]: http://example.com')
  .pipe(ref())
  .pipe(ast.stringify({indent: 2}))
  .pipe(process.stdout);
```

## Help

```
mkref [options]

Link reference collation.

  -h, --help              Display help and exit
  --version               Print the version and exit

Report bugs to https://github.com/mkdoc/mkref/issues
```

## API

### ref

```javascript
ref([opts][, cb])
```

Gets the link reference collation stream.

Returns an output stream.

* `opts` Object processing options.
* `cb` Function callback function.

#### Options

* `input` Readable input stream.
* `output` Writable output stream.

## License

MIT

---

Created by [mkdoc](https://github.com/mkdoc/mkdoc) on April 2, 2016

[mkdoc]: https://github.com/mkdoc/mkdoc
[mkparse]: https://github.com/mkdoc/mkparse
[commonmark]: http://commonmark.org
[jshint]: http://jshint.com
[jscs]: http://jscs.info

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