doxdox-workspace (main) doxdox documentation

📘 JSDoc to Markdown, Bootstrap, and custom JavaScript template documentation generator.

# loadPlugin(directories, prefix, pathOrPackage)

Load plugin from file or directory. const plugin = await loadPlugin([process.cwd()], null, './renderer.js'); const plugin = await loadPlugin(['../node_modules'], 'doxdox-renderer-', 'json');

Parameters

Name Types Description
directories string[] Root directories to load plugin from.
prefix string Optional prefix to attach to the pathOrPackage.
pathOrPackage string Path or package name.

Returns

Promise<T | null>

Plugin default method.

# loadPluginFromFile(path)

Load plugin from path. const plugin = await loadPluginFromFile('./doxdox-renderer-json/dist/index.js');

Parameters

Name Types Description
path string Plugin file path.

Returns

Promise<T | null>

Plugin default method.

# loadPluginFromPackagePath(path)

Load plugin from package directory. const plugin = await loadPluginFromPackagePath('./doxdox-parser-jsdoc');

Parameters

Name Types Description
path string Directory containing a plugin package.

Returns

Promise<T | null>

Plugin default method.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# findParentNodeModules(currentDirectory, maxDepth)

Finds the closest node_module folder in the parent directories.

Parameters

Name Types Description
currentDirectory string Current directory.
maxDepth number Optional max depth.

Returns

Promise<string | null>

Path to node_modules directory.

# getProjectPackage()

Returns basic information from a projects package file.

Returns

Promise<Package>

Basic information from a package file.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# isDirectory(path)

Checks to see if path is a directory.

Parameters

Name Types Description
path string Path to check.

Returns

Promise<boolean>

# isFile(path)

Checks to see if path is a file.

Parameters

Name Types Description
path string Path to check.

Returns

Promise<boolean>

# multiLinePatternMatch(content, pattern)

Return information about pattern if found within contents.

Parameters

Name Types Description
content string Full contents to search for pattern in.
pattern string Pattern to look for in contents.

Returns

{ start: number; end?: number; matched: boolean }

# parseConfigFromCLI(rawFlags)

Parse config key/value pairs from raw CLI flags. console.log(await parseConfigFromCLI([['-c', 'key=value']]));

Parameters

Name Types Description
rawFlags [string, string boolean][]

Returns

{ [key in string]: string | boolean }

Configs key/value pairs.

# parseIgnoreConfig(contents)

Parse contents of ignore file. console.log(await parseIgnoreConfig('node_modules/'));

Parameters

Name Types Description
contents string Contents of ignore file.

Returns

string[]

List of ignored paths and files.

# slugify()

Slugify a value for use as an anchor.

Returns

string

Contents to slugify.

# color()

The module's color property.

# color()

Color.

# define()

A module representing a jacket.

# getStyleProperty(element, propertyName)

Get the value of a property on an element.

Parameters

Name Types Description
element HTMLElement - The element.
propertyName string - The name of the property.

Returns

*

The value of the property.

# Jacket()

Create a new jacket.

# Jacket.zip()

Zip up the jacket.

# module.zip(jacket)

Zip up a jacket.

Parameters

Name Types Description
jacket Jacket - The jacket to zip up.

# shirt()

A module representing a shirt.

# size()

Size.

# tag()

# Tag(tagName)

Create a new Tag.

Parameters

Name Types Description
tagName string - The name of the tag.

# this.size()

The class's size property.

# Turtleneck(size)

Create a new Turtleneck.

Parameters

Name Types Description
size string - The size (XS, S, M, L, XL, or XXL).

# utils()

Utility functions to ease working with DOM elements.

# utils.isInHead(element)

Determine if an element is in the document head.

Parameters

Name Types Description
element HTMLElement - The element.

Returns

boolean

Set to `true` if the element is in the document head, `false` otherwise.

# Book(title, author)

Represents a book.

Parameters

Name Types Description
title string - The title of the book.
author string - The author of the book.

# foo()

This is a description of the foo function.

# blend(color1, color2)

Blend two colors together.

Parameters

Name Types Description
color1 string - The first color, in hexadecimal format.
color2 string - The second color, in hexadecimal format.

Returns

string

The blended color.

# blend(color1, color2)

Blend two colors together.

Parameters

Name Types Description
color1 string - The first color, in hexadecimal format.
color2 string - The second color, in hexadecimal format.

Returns

string

The blended color.

# blend(color1, color2)

Blend two colors together.

Parameters

Name Types Description
color1 string - The first color, in hexadecimal format.
color2 string - The second color, in hexadecimal format.

Returns

string

The blended color.

# ColorMixer()

Create a color mixer.

# darken(color, percent)

Darken a color by the given percentage.

Parameters

Name Types Description
color string - The color, in hexadecimal format.
percent number - The percentage, ranging from 0 to 100.

Returns

string

The darkened color.

# exports.button()

Button the shirt.

# exports.unbutton()

Unbutton the shirt.

# exports.wash()

Wash the shirt.

# mixer()

Color mixer.

# module.exports()

Color mixer.

# module.exports()

Color mixer.

# module.exports(color1, color2)

Blend two colors together.

Parameters

Name Types Description
color1 string - The first color, in hexadecimal format.
color2 string - The second color, in hexadecimal format.

Returns

string

The blended color.

# module.exports()

Module representing the word of the day.

# module.exports.darken(color, percent)

Darken a color by the given percentage.

Parameters

Name Types Description
color string - The color, in hexadecimal format.
percent number - The percentage, ranging from 0 to 100.

Returns

string

The darkened color.

# this.Book(title)

Create a new Book.

Parameters

Name Types Description
title string - The title of the book.

# this.title()

The title of the book.

# wash()

Wash the shirt.

# wash()

Wash the shirt.

# wash()

Shirt module.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# constructor(x, y)

Create a point.

Parameters

Name Types Description
x number - The x value.
y number - The y value.

# constructor(x, y, width)

Create a dot.

Parameters

Name Types Description
x number - The x value.
y number - The y value.
width number - The width of the dot, in pixels.

# Dot()

Class representing a dot.

# fromString(str)

Convert a string containing two comma-separated numbers into a point.

Parameters

Name Types Description
str string - The string containing two comma-separated numbers.

Returns

Point

A Point object.

# getWidth()

Get the dot's width.

Returns

number

The dot's width, in pixels.

# getX()

Get the x value.

Returns

number

The x value.

# getY()

Get the y value.

Returns

number

The y value.

# Point()

Class representing a point.

# Point()

Class representing a point.

# blend(color1, color2)

Blend two colors together.

Parameters

Name Types Description
color1 string - The first color, in hexadecimal format.
color2 string - The second color, in hexadecimal format.

Returns

string

The blended color.

# lastColor()

The most recent blended color.

# name()

The name of the module.

# toRgb(color)

Get the red, green, and blue values of a color.

Parameters

Name Types Description
color string - A color, in hexadecimal format.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# foo()

This is a description of the foo function.

# Project.assign(employee, employee.name, employee.department)

Assign the project to an employee.

Parameters

Name Types Description
employee Object - The employee who is responsible for the project.
employee.name string - The name of the employee.
employee.department string - The employee's department.

# Project.assign(employee, employee.name, employee.department)

Assign the project to an employee.

Parameters

Name Types Description
employee Object - The employee who is responsible for the project.
employee.name string - The name of the employee.
employee.department string - The employee's department.

# Project.assign(employees, employees[].name, employees[].department)

Assign the project to a list of employees.

Parameters

Name Types Description
employees Object[] - The employees who are responsible for the project.
employees[].name string - The name of an employee.
employees[].department string - The employee's department.

# sayHello(somebody)

Parameters

Name Types Description
somebody

# sayHello(somebody)

Parameters

Name Types Description
somebody string

# sayHello(somebody)

Parameters

Name Types Description
somebody string Somebody's name.

# sayHello(somebody)

Parameters

Name Types Description
somebody string - Somebody's name.

# sayHello(somebody)

Parameters

Name Types Description
somebody string - Somebody's name.

# sayHello(somebody)

Parameters

Name Types Description
somebody string= - Somebody's name.

# sayHello(somebody)

Parameters

Name Types Description
somebody string - Somebody's name.

# sayHello(somebody)

Parameters

Name Types Description
somebody (string string[])

# sayHello(somebody)

Parameters

Name Types Description
somebody * - Whatever you want.

# sum(num)

Returns the sum of all numbers passed to the function.

Parameters

Name Types Description
num ...number - A positive or negative number.

# constructor(x, y)

Create a point.

Parameters

Name Types Description
x number - The x value.
y number - The y value.

# Point()

Class representing a point.

# Point.getX()

Get the x value.

Returns

number

The x value.

# Point.getY()

Get the y value.

Returns

number

The y value.

# privateMethod()

private method

# privateMethod()

private method

# publicMethod()

# publicMethod()

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.

# findFileInPath(input, fileName)

Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));

Parameters

Name Types Description
input string Directory to check for file.
fileName string File name to check for.

Returns

Promise<string | null>

Path to package.json file.

# getCurrentWorkingDirectory()

Get the current working directory.

Returns

string

Directory path.

# getRootDirPath(url)

Get the root directory of the package, supplied path or URL.

Parameters

Name Types Description
url string Optional path or URL.

Returns

string

Directory path.