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

### Table of Contents

-   [lint][1]
    -   [Parameters][2]
    -   [Examples][3]
-   [build][4]
    -   [Parameters][5]
    -   [Examples][6]
-   [formats][7]
-   [formats.html][8]
    -   [Parameters][9]
    -   [Examples][10]
-   [formats.markdown][11]
    -   [Parameters][12]
    -   [Examples][13]
-   [formats.json][14]
    -   [Parameters][15]
    -   [Examples][16]

## lint

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

### SParameterssss

-   `indexes` **([Array][17]&lt;[string][18]> | [string][18])** files to process
-   `args` **[Object][19]** args
    -   `args.external` **[Array][17]&lt;[string][18]>** a string regex / glob match pattern
        that defines what external modules will be whitelisted and included in the
        generated documentation.
    -   `args.shallow` **[boolean][20]** whether to avoid dependency parsing
        even in JavaScript code. (optional, default `false`)
    -   `args.inferPrivate` **[string][18]?** 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][18] \| [Array][17]&lt;[string][18]>)?** treat additional file extensions
        as JavaScript, extending the default set of `js`, `es6`, and `jsx`.

### Examples

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

Returns **[Promise][21]** promise with lint results

## build

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

### Parameters

-   `indexes` **([Array][17]&lt;[string][18]> | [string][18])** files to process
-   `args` **[Object][19]** args
    -   `args.external` **[Array][17]&lt;[string][18]>** a string regex / glob match pattern
        that defines what external modules will be whitelisted and included in the
        generated documentation.
    -   `args.shallow` **[boolean][20]** whether to avoid dependency parsing
        even in JavaScript code. (optional, default `false`)
    -   `args.order` **[Array][17]&lt;([string][18] \| [Object][19])>** optional array that
        defines sorting order of documentation (optional, default `[]`)
    -   `args.access` **[Array][17]&lt;[string][18]>** an array of access levels
        to output in documentation (optional, default `[]`)
    -   `args.hljs` **[Object][19]?** hljs optional args
        -   `args.hljs.highlightAuto` **[boolean][20]** hljs automatically detect language (optional, default `false`)
        -   `args.hljs.languages` **[Array][17]?** languages for hljs to choose from
    -   `args.inferPrivate` **[string][18]?** 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][18] \| [Array][17]&lt;[string][18]>)?** treat additional file extensions
        as JavaScript, extending the default set of `js`, `es6`, and `jsx`.

### Examples

```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.
});
```

Returns **[Promise][21]** results

## formats

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.

## formats.html

Formats documentation as HTML.

### Parameters

-   `comments` **[Array][17]&lt;[Comment][22]>** parsed comments
-   `config` **[Object][19]** Options that can customize the output
    -   `config.theme` **[string][18]** Name of a module used for an HTML theme. (optional, default `'default_theme'`)

### Examples

```javascript
var documentation = require('documentation');
var streamArray = require('stream-array');
var vfs = require('vinyl-fs');

documentation.build(['index.js'])
  .then(documentation.formats.html)
  .then(output => {
    streamArray(output).pipe(vfs.dest('./output-directory'));
  });
```

Returns **[Promise][21]&lt;[Array][17]&lt;[Object][19]>>** Promise with results

## formats.markdown

Formats documentation as
[Markdown][23].

### Parameters

-   `comments` **[Array][17]&lt;[Object][19]>** parsed comments
-   `args` **[Object][19]** Options that can customize the output

### Examples

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

documentation.build(['index.js'])
  .then(documentation.formats.md)
  .then(output => {
    // output is a string of Markdown data
    fs.writeFileSync('./output.md', output);
  });
```

Returns **[Promise][21]&lt;[string][18]>** a promise of the eventual value

## formats.json

Formats documentation as a JSON string.

### Parameters

-   `comments` **[Array][17]&lt;[Comment][22]>** parsed comments

### Examples

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

documentation.build(['index.js'])
  .then(documentation.formats.json)
  .then(output => {
    // output is a string of JSON data
    fs.writeFileSync('./output.json', output);
  });
```

Returns **[Promise][21]&lt;[string][18]>** 

[1]: #lint

[2]: #parameters

[3]: #examples

[4]: #build

[5]: #parameters-1

[6]: #examples-1

[7]: #formats

[8]: #formatshtml

[9]: #parameters-2

[10]: #examples-2

[11]: #formatsmarkdown

[12]: #parameters-3

[13]: #examples-3

[14]: #formatsjson

[15]: #parameters-4

[16]: #examples-4

[17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

[21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise

[22]: https://developer.mozilla.org/docs/Web/API/Comment/Comment

[23]: https://daringfireball.net/projects/markdown/

~~~~~~~
{
  "type": "block",
  "name": "pod",
  "content": [
    {
      "type": "block",
      "name": "Html",
      "content": [
        {
          "type": "verbatim",
          "value": "<!-- Generated by documentation.js. Update this documentation by updating the source code. -->"
        }
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Table of Contents"
      ]
    },
    {
      "type": "list",
      "level": 1,
      "list": "itemized",
      "content": [
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "meta": "#lint",
                  "type": "fcode",
                  "name": "L",
                  "content": [
                    "lint"
                  ]
                }
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#parameters",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Parameters"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#examples",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Examples"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "meta": "#build",
                  "type": "fcode",
                  "name": "L",
                  "content": [
                    "build"
                  ]
                }
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#parameters-1",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Parameters"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#examples-1",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Examples"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "meta": "#formats",
                  "type": "fcode",
                  "name": "L",
                  "content": [
                    "formats"
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "meta": "#formatshtml",
                  "type": "fcode",
                  "name": "L",
                  "content": [
                    "formats.html"
                  ]
                }
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#parameters-2",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Parameters"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#examples-2",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Examples"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "meta": "#formatsmarkdown",
                  "type": "fcode",
                  "name": "L",
                  "content": [
                    "formats.markdown"
                  ]
                }
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#parameters-3",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Parameters"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#examples-3",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Examples"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "meta": "#formatsjson",
                  "type": "fcode",
                  "name": "L",
                  "content": [
                    "formats.json"
                  ]
                }
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#parameters-4",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Parameters"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "meta": "#examples-4",
                          "type": "fcode",
                          "name": "L",
                          "content": [
                            "Examples"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "block",
      "level": 2,
      "name": "head",
      "content": [
        "lint"
      ]
    },
    {
      "type": "para",
      "content": [
        "Lint files for non-standard or incorrect documentation\ninformation, returning a potentially-empty string\nof lint information intended for human-readable output."
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "SParameterssss"
      ]
    },
    {
      "type": "list",
      "level": 1,
      "list": "itemized",
      "content": [
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "indexes"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    "(",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Array"
                      ]
                    },
                    "<",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "string"
                      ]
                    },
                    "> | ",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "string"
                      ]
                    },
                    ")"
                  ]
                },
                " files to process"
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "args"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Object"
                      ]
                    }
                  ]
                },
                " args"
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.external"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Array"
                              ]
                            },
                            "<",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            ">"
                          ]
                        },
                        " a string regex / glob match pattern\nthat defines what external modules will be whitelisted and included in the\ngenerated documentation."
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.shallow"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "boolean"
                              ]
                            }
                          ]
                        },
                        " whether to avoid dependency parsing\neven in JavaScript code. (optional, default ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "false"
                          ]
                        },
                        ")"
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.inferPrivate"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            "?"
                          ]
                        },
                        " a valid regular expression string\nto infer whether a code element should be private, given its naming structure.\nFor instance, you can specify ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "inferPrivate: '^_'"
                          ]
                        },
                        " to automatically treat\nmethods named like ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "_myMethod"
                          ]
                        },
                        " as private."
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.extension"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            "(",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            " ",
                            "|",
                            " ",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Array"
                              ]
                            },
                            "<",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            ">)?"
                          ]
                        },
                        " treat additional file extensions\nas JavaScript, extending the default set of ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "js"
                          ]
                        },
                        ", ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "es6"
                          ]
                        },
                        ", and ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "jsx"
                          ]
                        },
                        "."
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Examples"
      ]
    },
    {
      "type": "block",
      "name": "code",
      "config": {
        "name": "lang",
        "value": "lang"
      },
      "content": [
        {
          "type": "verbatim",
          "value": "documentation.lint('file.js').then(lintOutput => {\n  if (lintOutput) {\n    console.log(lintOutput);\n    process.exit(1);\n  } else {\n    process.exit(0);\n  }\n});"
        }
      ]
    },
    {
      "type": "para",
      "content": [
        "Returns ",
        {
          "type": "fcode",
          "name": "B",
          "content": [
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
              "type": "fcode",
              "name": "L",
              "content": [
                "Promise"
              ]
            }
          ]
        },
        " promise with lint results"
      ]
    },
    {
      "type": "block",
      "level": 2,
      "name": "head",
      "content": [
        "build"
      ]
    },
    {
      "type": "para",
      "content": [
        "Generate JavaScript documentation as a list of parsed JSDoc\ncomments, given a root file as a path."
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Parameters"
      ]
    },
    {
      "type": "list",
      "level": 1,
      "list": "itemized",
      "content": [
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "indexes"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    "(",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Array"
                      ]
                    },
                    "<",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "string"
                      ]
                    },
                    "> | ",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "string"
                      ]
                    },
                    ")"
                  ]
                },
                " files to process"
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "args"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Object"
                      ]
                    }
                  ]
                },
                " args"
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.external"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Array"
                              ]
                            },
                            "<",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            ">"
                          ]
                        },
                        " a string regex / glob match pattern\nthat defines what external modules will be whitelisted and included in the\ngenerated documentation."
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.shallow"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "boolean"
                              ]
                            }
                          ]
                        },
                        " whether to avoid dependency parsing\neven in JavaScript code. (optional, default ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "false"
                          ]
                        },
                        ")"
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.order"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Array"
                              ]
                            },
                            "<",
                            "(",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            " ",
                            "|",
                            " ",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Object"
                              ]
                            },
                            ")>"
                          ]
                        },
                        " optional array that\ndefines sorting order of documentation (optional, default ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "[]"
                          ]
                        },
                        ")"
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.access"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Array"
                              ]
                            },
                            "<",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            ">"
                          ]
                        },
                        " an array of access levels\nto output in documentation (optional, default ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "[]"
                          ]
                        },
                        ")"
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.hljs"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Object"
                              ]
                            },
                            "?"
                          ]
                        },
                        " hljs optional args"
                      ]
                    },
                    {
                      "type": "list",
                      "level": 3,
                      "list": "itemized",
                      "content": [
                        {
                          "type": "block",
                          "name": "item",
                          "level": 3,
                          "content": [
                            {
                              "type": "para",
                              "content": [
                                {
                                  "type": "fcode",
                                  "name": "C",
                                  "content": [
                                    "args.hljs.highlightAuto"
                                  ]
                                },
                                " ",
                                {
                                  "type": "fcode",
                                  "name": "B",
                                  "content": [
                                    {
                                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
                                      "type": "fcode",
                                      "name": "L",
                                      "content": [
                                        "boolean"
                                      ]
                                    }
                                  ]
                                },
                                " hljs automatically detect language (optional, default ",
                                {
                                  "type": "fcode",
                                  "name": "C",
                                  "content": [
                                    "false"
                                  ]
                                },
                                ")"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "block",
                          "name": "item",
                          "level": 3,
                          "content": [
                            {
                              "type": "para",
                              "content": [
                                {
                                  "type": "fcode",
                                  "name": "C",
                                  "content": [
                                    "args.hljs.languages"
                                  ]
                                },
                                " ",
                                {
                                  "type": "fcode",
                                  "name": "B",
                                  "content": [
                                    {
                                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                                      "type": "fcode",
                                      "name": "L",
                                      "content": [
                                        "Array"
                                      ]
                                    },
                                    "?"
                                  ]
                                },
                                " languages for hljs to choose from"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.inferPrivate"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            "?"
                          ]
                        },
                        " a valid regular expression string\nto infer whether a code element should be private, given its naming structure.\nFor instance, you can specify ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "inferPrivate: '^_'"
                          ]
                        },
                        " to automatically treat\nmethods named like ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "_myMethod"
                          ]
                        },
                        " as private."
                      ]
                    }
                  ]
                },
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "args.extension"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            "(",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            " ",
                            "|",
                            " ",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "Array"
                              ]
                            },
                            "<",
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            },
                            ">)?"
                          ]
                        },
                        " treat additional file extensions\nas JavaScript, extending the default set of ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "js"
                          ]
                        },
                        ", ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "es6"
                          ]
                        },
                        ", and ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "jsx"
                          ]
                        },
                        "."
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Examples"
      ]
    },
    {
      "type": "block",
      "name": "code",
      "config": {
        "name": "lang",
        "value": "lang"
      },
      "content": [
        {
          "type": "verbatim",
          "value": "var documentation = require('documentation');\n\ndocumentation.build(['index.js'], {\n  // only output comments with an explicit @public tag\n  access: ['public']\n}).then(res => {\n  // res is an array of parsed comments with inferred properties\n  // and more: everything you need to build documentation or\n  // any other kind of code data.\n});"
        }
      ]
    },
    {
      "type": "para",
      "content": [
        "Returns ",
        {
          "type": "fcode",
          "name": "B",
          "content": [
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
              "type": "fcode",
              "name": "L",
              "content": [
                "Promise"
              ]
            }
          ]
        },
        " results"
      ]
    },
    {
      "type": "block",
      "level": 2,
      "name": "head",
      "content": [
        "formats"
      ]
    },
    {
      "type": "para",
      "content": [
        "Documentation's formats are modular methods that take comments\nand config as input and return Promises with results,\nlike stringified JSON, markdown strings, or Vinyl objects for HTML\noutput."
      ]
    },
    {
      "type": "block",
      "level": 2,
      "name": "head",
      "content": [
        "formats.html"
      ]
    },
    {
      "type": "para",
      "content": [
        "Formats documentation as HTML."
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Parameters"
      ]
    },
    {
      "type": "list",
      "level": 1,
      "list": "itemized",
      "content": [
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "comments"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Array"
                      ]
                    },
                    "<",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/API/Comment/Comment",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Comment"
                      ]
                    },
                    ">"
                  ]
                },
                " parsed comments"
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "config"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Object"
                      ]
                    }
                  ]
                },
                " Options that can customize the output"
              ]
            },
            {
              "type": "list",
              "level": 2,
              "list": "itemized",
              "content": [
                {
                  "type": "block",
                  "name": "item",
                  "level": 2,
                  "content": [
                    {
                      "type": "para",
                      "content": [
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "config.theme"
                          ]
                        },
                        " ",
                        {
                          "type": "fcode",
                          "name": "B",
                          "content": [
                            {
                              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
                              "type": "fcode",
                              "name": "L",
                              "content": [
                                "string"
                              ]
                            }
                          ]
                        },
                        " Name of a module used for an HTML theme. (optional, default ",
                        {
                          "type": "fcode",
                          "name": "C",
                          "content": [
                            "'default_theme'"
                          ]
                        },
                        ")"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Examples"
      ]
    },
    {
      "type": "block",
      "name": "code",
      "config": {
        "name": "lang",
        "value": "lang"
      },
      "content": [
        {
          "type": "verbatim",
          "value": "var documentation = require('documentation');\nvar streamArray = require('stream-array');\nvar vfs = require('vinyl-fs');\n\ndocumentation.build(['index.js'])\n  .then(documentation.formats.html)\n  .then(output => {\n    streamArray(output).pipe(vfs.dest('./output-directory'));\n  });"
        }
      ]
    },
    {
      "type": "para",
      "content": [
        "Returns ",
        {
          "type": "fcode",
          "name": "B",
          "content": [
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
              "type": "fcode",
              "name": "L",
              "content": [
                "Promise"
              ]
            },
            "<",
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
              "type": "fcode",
              "name": "L",
              "content": [
                "Array"
              ]
            },
            "<",
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
              "type": "fcode",
              "name": "L",
              "content": [
                "Object"
              ]
            },
            ">>"
          ]
        },
        " Promise with results"
      ]
    },
    {
      "type": "block",
      "level": 2,
      "name": "head",
      "content": [
        "formats.markdown"
      ]
    },
    {
      "type": "para",
      "content": [
        "Formats documentation as\n",
        {
          "meta": "https://daringfireball.net/projects/markdown/",
          "type": "fcode",
          "name": "L",
          "content": [
            "Markdown"
          ]
        },
        "."
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Parameters"
      ]
    },
    {
      "type": "list",
      "level": 1,
      "list": "itemized",
      "content": [
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "comments"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Array"
                      ]
                    },
                    "<",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Object"
                      ]
                    },
                    ">"
                  ]
                },
                " parsed comments"
              ]
            }
          ]
        },
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "args"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Object"
                      ]
                    }
                  ]
                },
                " Options that can customize the output"
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Examples"
      ]
    },
    {
      "type": "block",
      "name": "code",
      "config": {
        "name": "lang",
        "value": "lang"
      },
      "content": [
        {
          "type": "verbatim",
          "value": "var documentation = require('documentation');\nvar fs = require('fs');\n\ndocumentation.build(['index.js'])\n  .then(documentation.formats.md)\n  .then(output => {\n    // output is a string of Markdown data\n    fs.writeFileSync('./output.md', output);\n  });"
        }
      ]
    },
    {
      "type": "para",
      "content": [
        "Returns ",
        {
          "type": "fcode",
          "name": "B",
          "content": [
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
              "type": "fcode",
              "name": "L",
              "content": [
                "Promise"
              ]
            },
            "<",
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
              "type": "fcode",
              "name": "L",
              "content": [
                "string"
              ]
            },
            ">"
          ]
        },
        " a promise of the eventual value"
      ]
    },
    {
      "type": "block",
      "level": 2,
      "name": "head",
      "content": [
        "formats.json"
      ]
    },
    {
      "type": "para",
      "content": [
        "Formats documentation as a JSON string."
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Parameters"
      ]
    },
    {
      "type": "list",
      "level": 1,
      "list": "itemized",
      "content": [
        {
          "type": "block",
          "name": "item",
          "level": 1,
          "content": [
            {
              "type": "para",
              "content": [
                {
                  "type": "fcode",
                  "name": "C",
                  "content": [
                    "comments"
                  ]
                },
                " ",
                {
                  "type": "fcode",
                  "name": "B",
                  "content": [
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Array"
                      ]
                    },
                    "<",
                    {
                      "meta": "https://developer.mozilla.org/docs/Web/API/Comment/Comment",
                      "type": "fcode",
                      "name": "L",
                      "content": [
                        "Comment"
                      ]
                    },
                    ">"
                  ]
                },
                " parsed comments"
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "block",
      "level": 3,
      "name": "head",
      "content": [
        "Examples"
      ]
    },
    {
      "type": "block",
      "name": "code",
      "config": {
        "name": "lang",
        "value": "lang"
      },
      "content": [
        {
          "type": "verbatim",
          "value": "var documentation = require('documentation');\nvar fs = require('fs');\n\ndocumentation.build(['index.js'])\n  .then(documentation.formats.json)\n  .then(output => {\n    // output is a string of JSON data\n    fs.writeFileSync('./output.json', output);\n  });"
        }
      ]
    },
    {
      "type": "para",
      "content": [
        "Returns ",
        {
          "type": "fcode",
          "name": "B",
          "content": [
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
              "type": "fcode",
              "name": "L",
              "content": [
                "Promise"
              ]
            },
            "<",
            {
              "meta": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String",
              "type": "fcode",
              "name": "L",
              "content": [
                "string"
              ]
            },
            ">"
          ]
        },
        " "
      ]
    }
  ]
}