Node.js API documentation is generated using in-house tooling from the nodejs/doc-kit repository. The tooling processes Markdown files from doc/api/ and generates both HTML and JSON outputs.
# module<!--introduced_in=v0.10.0-->> Stability: 2 - StableA description and examples.## `module.property`<!-- YAMLadded: v0.10.0-->- {type}A description of the property.## `module.someFunction(x, y, [z=100])`<!-- YAMLadded: v0.10.0changes: - version: v15.0.0 pr-url: https://github.com/nodejs/node/pull/12345 description: A description of the change.-->- `x` {string} The description of the string.- `y` {boolean} Should I stay or should I go?- `z` {number} How many zebras to bring. **Default:** `100`.A description of the function.```cjs// An example using CJS syntax.const { someFunction } = require('module');someFunction('a', true, 10);``````mjs// An example using MJS syntax.import { someFunction } from 'module';someFunction('a', true, 10);```
## Class: `SomeClass`A description of the class.### `SomeClass.classMethod(anArg)`<!-- YAMLadded: v0.10.0-->- `anArg` {Object} Just an argument. - `field` {string} `anArg` can have this field. - `field2` {boolean} Another field. **Default:** `false`.- Returns: {boolean} `true` if it worked.A description of the method for humans.### `SomeClass.nextSibling()`<!-- YAMLadded: v0.10.0-->- Returns: {SomeClass | null} The next `SomeClass` in line.### `SomeClass.someProperty`<!-- YAMLadded: v0.10.0-->- {string}The indication of what `someProperty` is.
Custom classes must be registered in doc-kit constants.mjs to be properly parsed in type fields.
## Event: `blerg`<!-- YAMLadded: REPLACEME-->- `anArg` {type} A description of the listener argument.Modules don't usually raise events on themselves. `cluster` is the exception.
<!-- YAMLadded: v0.10.0deprecated: v14.0.0-->> Stability: 0 - Deprecated: Use [`newApi()`][] instead.This method is deprecated and will be removed in a future version.Use [`newApi()`][] for new code.[`newApi()`]: #newapi