# fn-docs

> parse docs out of a function

Latest version **0.1.0** (published 2014-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install fn-docs
pnpm add fn-docs
yarn add fn-docs
bun add fn-docs
```

## 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 | 2014-08-13 |
| First published | 2014-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Matthew Chase Whittemore |
| Maintainers | mcwhittemore |
| Keywords | function, docs, parse, comments |

## Links

- npm: https://www.npmjs.com/package/fn-docs
- Repository: https://github.com/mcwhittemore/fn-docs
- Issues: https://github.com/mcwhittemore/fn-docs/issues
- npm.io page: https://npm.io/package/fn-docs

## Dependencies (1)

- [should](https://npm.io/package/should.md) ~4.0.4

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-08-13

## README

# fn-docs

Quickly rip docs out of your functions by parsing comments.

## Example

```js
var fnDocs = require("fn-docs");
var parser = fnDocs();
var simpleFn = function(){
	/*
	1
		2
	3
	*/
}
var docs = parser(simpleFn);
console.log(docs);
```

Resulting in

```
1
	2
3
```

## Options

`fn-docs` takes in one optional config object. This config object has three optional attributes, `start`, `end`, `defaultDoc`.

### start

This optional config option defaults to `/*`. The first line this marker is found in (in any way) is marked as the line before the docs start.

```
/* this is not in the docs
but this is
```

```
var abc = 'abc'; /* none of this line is in the docs
but this is
```

### end

This optional config option defaults to `*\`. The first line this marker is found in (in any way) is marked as the line after the docs end.

```
This is in the docs
but this isn't */
```

```
This is in the docs
but this isn't */ var abc = 'abc';
```

### defaultDoc

This optional config option defaults to `null`. It it used when ever start isn't found, end isn't found, or start and end have no space between them. If end is before start an error is thrown.

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