1.2.4 • Published 3 years ago

dmd-readable v1.2.4

Weekly downloads
641
License
MIT
Repository
github
Last release
3 years ago

Dmd Readable

A plugin for dmd and jsdoc-to-markdown to provide more readable docs

npm deps size vulnerabilities license

Installation

npm install dmd-readable

About

Pass the plug-in name to jsdoc2md or dmd:

jsdoc2md --plugin dmd-readable

This plugin (which was used to generate this readme) does a few things:

  • removes global indexes (see below)
  • places descriptions in block-quotes (Use @summary for descriptions without block quotes)
  • adds more whitespace before headings
  • changes the delimiter for multiple types in param tables to a comma
  • adds alias output

The removal of global indexes is now a setting in the template. If you are using your own template and you wish to retain this feature, add the following line to your template:

{{optionSet "global-index-format" "none"~}}

All options for global-index-format are "none", "grouped", "table", "dl". Other options and more info can be found here.

This plugin also provides the following helper functions:

package(key) ⇒ *

Reads info from the package.json file.

See: docs.hbs for an example of how to use this function

ParamTypeDescription
keystringThe package property you want returned

changeCase(to, string) ⇒ string

Implements the library change-case.

See: docs.hbs for an example of how to use this function

ParamTypeDescription
tostringShorthand or full name for the change-case function.
stringstringThe string to modify

prefixLines(string, replacer) ⇒ string

Prefixes a string to the beginning of each line in the first string

ParamTypeDescription
stringstringThe string to modify
replacerstringThe string to prefix to each line

findBy(array, key, value) ⇒ array

Finds an object in an array with a matching key: value

ParamTypeDescription
arrayarrayThe array to search
keystringThe key to compare
valuestringThe value to find

replace(string, pattern, newString) ⇒ string

Calls string.replace

ParamTypeDescription
stringstringThe string to modify
patternstringThe first arg for string.replace
newStringstringThe second arg for string.replace

isNew(string) ⇒ boolean

Determines if the provided string is truthy and is different than the string provided the previous time this function was called

ParamType
stringstring
1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago