# foo

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

-   [expandInputs](#expandinputs)
-   [lint](#lint)
-   [build](#build)
-   [formats](#formats)

### [expandInputs](https://github.com/berstend/documentation-markdown-themes/blob/e0eefde467bc13d45b2a7295d5d69cfbf3d7780e/src/index.js#L70-L79)

Given an array of indexes and options for whether to resolve shallow
or deep dependencies, resolve dependencies.

-   `indexes` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** files to process
-   `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** options

* * *

### [lint](https://github.com/berstend/documentation-markdown-themes/blob/e0eefde467bc13d45b2a7295d5d69cfbf3d7780e/src/index.js#L185-L185)

Lint files for non-standard or incorrect documentation
information, returning a potentially-empty string
of lint information intended for human-readable output.

-   `indexes` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** files to process
-   `args` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** args
    -   `args.external` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** a string regex / glob match pattern
        that defines what external modules will be whitelisted and included in the
        generated documentation.
    -   `args.shallow` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether to avoid dependency parsing
        even in JavaScript code. (optional, default `false`)
    -   `args.inferPrivate` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** a valid regular expression string
        to infer whether a code element should be private, given its naming structure.
        For instance, you can specify `inferPrivate: '^_'` to automatically treat
        methods named like `_myMethod` as private.
    -   `args.extension` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)?** treat additional file extensions
        as JavaScript, extending the default set of `js`, `es6`, and `jsx`.

Example:

```javascript
documentation.lint('file.js').then(lintOutput => {
  if (lintOutput) {
    console.log(lintOutput);
    process.exit(1);
  } else {
    process.exit(0);
  }
});
```

* * *

### [build](https://github.com/berstend/documentation-markdown-themes/blob/e0eefde467bc13d45b2a7295d5d69cfbf3d7780e/src/index.js#L225-L225)

Generate JavaScript documentation as a list of parsed JSDoc
comments, given a root file as a path.

-   `indexes` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** files to process
-   `args` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** args
    -   `args.external` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** a string regex / glob match pattern
        that defines what external modules will be whitelisted and included in the
        generated documentation.
    -   `args.shallow` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether to avoid dependency parsing
        even in JavaScript code. (optional, default `false`)
    -   `args.order` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))>** optional array that
        defines sorting order of documentation (optional, default `[]`)
    -   `args.access` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** an array of access levels
        to output in documentation (optional, default `[]`)
    -   `args.hljs` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** hljs optional args
        -   `args.hljs.highlightAuto` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** hljs automatically detect language (optional, default `false`)
        -   `args.hljs.languages` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** languages for hljs to choose from
    -   `args.inferPrivate` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** a valid regular expression string
        to infer whether a code element should be private, given its naming structure.
        For instance, you can specify `inferPrivate: '^_'` to automatically treat
        methods named like `_myMethod` as private.
    -   `args.extension` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)?** treat additional file extensions
        as JavaScript, extending the default set of `js`, `es6`, and `jsx`.

Example:

```javascript
var documentation = require('documentation');

documentation.build(['index.js'], {
  // only output comments with an explicit @public tag
  access: ['public']
}).then(res => {
  // res is an array of parsed comments with inferred properties
  // and more: everything you need to build documentation or
  // any other kind of code data.
});
```

* * *

### [formats](https://github.com/berstend/documentation-markdown-themes/blob/e0eefde467bc13d45b2a7295d5d69cfbf3d7780e/src/index.js#L234-L240)

Documentation's formats are modular methods that take comments
and config as input and return Promises with results,
like stringified JSON, markdown strings, or Vinyl objects for HTML
output.

* * *
