node/tools/doc
Rich Trott 7e739ae159 test,tools: adjust function argument alignment
In preparation for a lint rule enforcing function argument alignment,
adjust function arguments to be aligned.

PR-URL: https://github.com/nodejs/node/pull/7100
Refs: https://github.com/nodejs/node/pull/6390
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
2016-06-23 17:26:37 -07:00
..
node_modules
addon-verify.js src,test,tools: modify for more stringent linting 2016-03-02 14:01:11 -08:00
generate.js tools: apply linting to doc tools 2016-03-02 14:01:11 -08:00
html.js test,tools: adjust function argument alignment 2016-06-23 17:26:37 -07:00
json.js tools,doc: fix json for grouped optional params 2016-05-17 17:24:39 -07:00
LICENSE
package.json
preprocess.js tools: apply linting to doc tools 2016-03-02 14:01:11 -08:00
README.md doc: remove out-of-date matter from internal docs 2016-03-02 14:01:11 -08:00
type-parser.js lib,test,tools: alignment on variable assignments 2016-06-23 16:59:37 -07:00

Here's how the node docs work.

1:1 relationship from lib/<module>.js to doc/api/<module>.markdown

Each type of heading has a description block.

## module

    Stability: 3 - Stable

description and examples.

### module.property

* Type

description of the property.

### module.someFunction(x, y, [z=100])

* `x` {String} the description of the string
* `y` {Boolean} Should I stay or should I go?
* `z` {Number} How many zebras to bring.

A description of the function.

### Event: 'blerg'

* Argument: SomeClass object.

Modules don't usually raise events on themselves.  `cluster` is the
only exception.

## Class: SomeClass

description of the class.

### Class Method: SomeClass.classMethod(anArg)

* `anArg` {Object}  Just an argument
  * `field` {String} anArg can have this field.
  * `field2` {Boolean}  Another field.  Default: `false`.
* Return: {Boolean} `true` if it worked.

Description of the method for humans.

### someClass.nextSibling()

* Return: {SomeClass object | null}  The next someClass in line.

### someClass.someProperty

* String

The indication of what someProperty is.

### Event: 'grelb'

* `isBlerg` {Boolean}

This event is emitted on instances of SomeClass, not on the module itself.
  • Modules have (description, Properties, Functions, Classes, Examples)
  • Properties have (type, description)
  • Functions have (list of arguments, description)
  • Classes have (description, Properties, Methods, Events)
  • Events have (list of arguments, description)
  • Methods have (list of arguments, description)
  • Properties have (type, description)