([Object], Object) → undefined
data
TaffyDB database passed in by JSDoc
opts
Options info passed in by JSDoc
opts._
List of files/directories to scan
opts.readme
Text to use for README page
opts.configure
Path to JSDoc configuration file, e.g. ".jsdoc.json"
opts.destination
The path to the output folder for the generated documentation.
opts.encoding
Assume this encoding when reading all source files. Defaults to "utf8"
.
opts.pedantic
Treat errors as fatal errors, and treat warnings as errors.
opts.private
Include symbols marked with the @private
tag in the generated documentation.
opts.recurse
Recurse into subdirectories when scanning for source files and tutorials
opts.template
The path to the template directory to use for generating output (the directory containing the publish.js
script and other needed files)
Added in v0.0.1
Function called by JSDoc to generate the final documentation files.
Empties target directory specified in opts.destination
then populates with documentation files generated from
data
passed in by JSDoc.
(String, String) → undefined
sourceDir
Directory from which to copy contents
destDir
Directory to copy to
Added in v0.0.1
Copies a directory's contents recursively, creating the destination directory if needed
_copyDir(
'/Users/foo/elv-ramdoc/node_modules/ramda/dist',
'/Users/foo/elv-ramdoc/docs/js',
) //=> undefined
String → String
mdString
text in Markdown format
HTML text
Added in v0.0.1
Converts text in Markdown format to an HTML string
_markdownToHtml('#foo') //=> '<h1 id="foo">foo</h1>'
String | [String] → String
(unnamed)
string or array of strings containing lines of code
HTML text
Added in v0.0.1
Formats example Javascript code using highlight.js syntax highlighting
_prettifyCode('console.log(x)') //=> '<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(x)'
String → String
(unnamed)
input string (@sig tag contents)
String with symbols substituted in
Added in v0.0.1
Replaces '...' with '…' and '->' with '→'. Used for processing @sig tags
_prettifySig('a -> b') //=> 'a → b'
String → ([Object] → [Object])
baseDir
base directory of project
Function that accepts and array of objects and returns an array of new objects
Added in v0.0.1
Returns a function that converts an array of JSDoc data objects to an array of objects tailored for our pug template.
[String] → [String]
(unnamed)
@see tag contents as string array
String array with each item in a separate element, regardless of whether it was on a new line or was on same line as another item but separated by a comma
Added in v0.0.1
Splits each string in an array by comma (excising whitespace in the process), keeping the array flat. Used to simplify handling of @see tag listing multiple items, where items might be listed on same line (separated by commas) on multiple lines.
_simplifySee(
[
'foo, bar',
'baz'
]
) //=> [ 'foo', 'bar', 'baz' ]
String → [Object] → [Object]
(unnamed)
The string to filter by
(unnamed)
Array of objects to filter by 'title' attribute
The filtered object array
Added in v0.0.1
Filters array of objects based on title
attribute.
_titleFilter('see')(
[
{title: 'since'},
{title: 'see'}
]
) //=> [{title: 'see'}]
[Object] → [*]
(unnamed)
Array of objects
Extracted value
property from each object
Added in v0.0.1
Extracts 'value' property from an array of objects, flattening one level if 'value' is an array
_valueProp(
[
{value: 'a'},
{value: ['b', 'c']}
]
) //=> ['a', 'b', 'c']