ddata is a collection of handlebars helpers for working with the documentation data output by jsdoc-parse.
Example
var handlebars = require("handlebars");
var ddata = require("ddata");
var docs = require("./docs.json"); // jsdoc-parse output
handlebars.registerHelper(ddata);
var template =
"{{#module name='yeah-module'}}\
The author of the module is: {{author}}.\
{{/module}}";
console.log(handlebars.compile(template)(docs));
- ddata
- static
- ._globals()
- ._link(input, options)
- .isClass() ⇒
boolean
- .isClassMember() ⇒
boolean
- .isEvent() ⇒
boolean
- ._identifiers() ⇒
array
- ._children([sortBy], [min]) ⇒
Array.<identifier>
- .descendants([sortBy], [min]) ⇒
Array.<identifier>
- .exported() ⇒
identifier
- ._identifier()
- .parentObject()
- .parseLink(text) ⇒
Array.<{original: string, caption: string, url: string}>
- .parentName() ⇒
string
- .option()
- .optionEquals()
- .optionSet()
- .optionIsSet()
- .indent()
- .stripNewlines()
- .headingDepth()
- .depth()
- .depthIncrement()
- .depthDecrement()
- .indexDepth()
- .indexDepthIncrement()
- .indexDepthDecrement()
- .indexDepth()
- Block helper: selector
- Block helper: util
- .link(id)
- .returnSig2() ⇒
Object
- Returns list
- ._orphans() ⇒
array
- ._orphans() ⇒
- Returns string
- .anchorName() ⇒
string
- .md()
- .methodSig() ⇒
string
- .anchorName() ⇒
- returns boolean
- .showMainIndex() ⇒
boolean
- .showMainIndex() ⇒
- inner
- Block helper: util
- static
omits externals without a description
Kind: static method of ddata
e.g. namepaths module:Something
or type expression Array.<module:Something>
Kind: static method of ddata
Param | Type | Description |
---|---|---|
input | string |
namepath or type expression |
options | object |
the handlebars helper options object |
Kind: static method of ddata
this: {identifier}
returns true if the parent of the current identifier is a class
Kind: static method of ddata
returns true if this is an event
Kind: static method of ddata
Returns an array of identifiers matching the query
Kind: static method of ddata
return the identifiers which are a memberof
this one. Exclude externals without descriptions.
Kind: static method of ddata
this: {identifier}
Param | Type | Description |
---|---|---|
[sortBy] | string |
"kind" |
[min] | number |
only returns if there are min children |
return a flat list containing all decendants
Kind: static method of ddata
this: {identifier}
Param | Type | Description |
---|---|---|
[sortBy] | string |
"kind" |
[min] | number |
only returns if there are min children |
returns the exported identifier of this module
Kind: static method of ddata
this: {identifier}
Returns an identifier matching the query
Kind: static method of ddata
Returns the parent
Kind: static method of ddata
extracts url and caption data from @link tags
Kind: static method of ddata
Param | Type | Description |
---|---|---|
text | string |
a string containing one or more {@link} tags |
returns the parent name, instantiated if necessary
Kind: static method of ddata
this: {identifier}
returns a dmd option, e.g. "sort-by", "heading-depth" etc.
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
Kind: static method of ddata
render the supplied block for each identifier in the query
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for each parent (global identifier, or module)
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for each parent (global identifier, or module)
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for each module
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for the specified module
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for the specified identifier
Kind: static method of ddata
Category: Block helper: selector
render the block for each class
Kind: static method of ddata
Category: Block helper: selector
render the block for each function/method
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for the specified class
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for the specified function
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for the specified function
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for the specified enum
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for each orphan with no scope set
Kind: static method of ddata
Category: Block helper: selector
render the supplied block for each child
Kind: static method of ddata
Category: Block helper: selector
Kind: static method of ddata
Category: Block helper: selector
Kind: static method of ddata
Category: Block helper: util
Param | Type | Description |
---|---|---|
id | string |
the ID to link to, e.g. external:XMLHttpRequest , GlobalClass#propOne etc. |
Example
Kind: static method of ddata
Category: Block helper: util
Returns an array of the top-level elements which have no parents. Output only includes externals which have a description.
Kind: static method of ddata
Category: Returns list
returns a unique ID string suitable for use as an href
.
Kind: static method of ddata
Category: Returns string
this: {identifier}
Example
> ddata.anchorName.call({ id: "module:yeah--Yeah()" })
'module_yeah--Yeah_new'
converts the supplied text to markdown
Kind: static method of ddata
Category: Returns string
Returns the method signature, e.g. (options, [onComplete])
Kind: static method of ddata
Category: Returns string
this: {identifier}
True if there at least two top-level identifiers (i.e. globals or modules)
Kind: static method of ddata
Category: returns boolean
Kind: inner method of ddata
Category: Block helper: util
© 2015 Lloyd Brookes <[email protected]>. Documented by jsdoc-to-markdown.