Open-Source Wikis

/

Node.js

/

API surface

nodejs/node

API surface

The public Node.js API is documented in doc/api/. Each Markdown file maps to a top-level documented module (or, in some cases, a topic page like cli.md, errors.md, globals.md, embedding.md).

This page is an orientation aid; the canonical, version-tracked rendered docs live at https://nodejs.org/api/.

Module → source map

Doc page JS implementation C++ binding (if any)
assert.md lib/assert.js, lib/internal/assert/
async_hooks.md lib/async_hooks.js, lib/internal/async_hooks.js src/async_wrap.cc
async_context.md lib/internal/async_local_storage/ src/async_context_frame.cc
buffer.md lib/buffer.js, lib/internal/buffer.js src/node_buffer.cc
child_process.md lib/child_process.js, lib/internal/child_process.js src/process_wrap.cc, src/spawn_sync.cc
cli.md (none — flag parser) src/node_options.{cc,h}
cluster.md lib/cluster.js, lib/internal/cluster/
console.md lib/console.js, lib/internal/console/
crypto.md, webcrypto.md lib/crypto.js, lib/internal/crypto/ src/crypto/, deps/ncrypto/
dgram.md lib/dgram.js, lib/internal/dgram.js src/udp_wrap.cc
diagnostics_channel.md lib/diagnostics_channel.js src/node_diagnostics_channel.cc
dns.md lib/dns.js, lib/internal/dns/ src/cares_wrap.cc
embedding.md (none — describes embedder API) src/node.h, src/embedded_data.h
errors.md lib/internal/errors.js src/node_errors.{cc,h}
esm.md, modules.md, module.md, packages.md lib/internal/modules/ src/module_wrap.cc
events.md lib/events.js, lib/internal/event_target.js
ffi.md lib/ffi.js src/node_ffi.cc, src/ffi/
fs.md lib/fs.js, lib/fs/promises.js, lib/internal/fs/ src/node_file.cc, src/node_dir.cc
globals.md lib/internal/bootstrap/node.js, lib/internal/bootstrap/web/
http.md, https.md lib/_http_*.js, lib/http.js, lib/https.js src/node_http_parser.cc
http2.md lib/http2.js, lib/internal/http2/ src/node_http2.cc
inspector.md lib/inspector.js, lib/internal/inspector/ src/inspector/, src/inspector_*.cc
intl.md (none — describes ICU integration) src/node_i18n.cc
module.md lib/internal/modules/customization_hooks.js
n-api.md (none — C addon API) src/js_native_api*, src/node_api*
net.md lib/net.js, lib/internal/net.js src/tcp_wrap.cc, src/pipe_wrap.cc
os.md lib/os.js src/node_os.cc
path.md lib/path.js, lib/path/ src/path.cc (URL helpers)
perf_hooks.md lib/perf_hooks.js, lib/internal/perf/ src/node_perf.cc, src/histogram.cc
permissions.md lib/internal/process/permission.js src/permission/
process.md lib/internal/process/, lib/internal/bootstrap/node.js src/node_process_*.cc
punycode.md lib/punycode.js (deprecated, soft-removed)
querystring.md lib/querystring.js, lib/internal/querystring.js
quic.md lib/quic.js, lib/internal/quic/ src/quic/
readline.md lib/readline.js, lib/internal/readline/
repl.md lib/repl.js, lib/internal/repl/
report.md lib/internal/process/report.js src/node_report.cc, src/node_report_module.cc
single-executable-applications.md lib/sea.js src/node_sea.cc, src/node_sea_bin.cc
sqlite.md lib/sqlite.js src/node_sqlite.cc, deps/sqlite/
stream.md, stream_iter.md lib/stream.js, lib/internal/streams/ src/stream_base.cc, src/stream_pipe.cc
string_decoder.md lib/string_decoder.js src/string_decoder.cc
test.md lib/test.js, lib/internal/test_runner/
timers.md lib/timers.js, lib/internal/timers.js src/timers.cc, src/timer_wrap.cc
tls.md lib/tls.js, lib/internal/tls/ src/crypto/crypto_tls.cc, src/crypto/crypto_context.cc
tracing.md lib/trace_events.js src/tracing/, src/node_trace_events.cc
tty.md lib/tty.js src/tty_wrap.cc
typescript.md lib/internal/modules/typescript.js deps/amaro/
url.md lib/url.js, lib/internal/url.js src/node_url.cc, src/node_url_pattern.cc, deps/ada/
util.md lib/util.js, lib/internal/util/ src/node_util.cc
v8.md lib/v8.js, lib/internal/v8/ src/node_v8.cc, src/node_serdes.cc
vm.md lib/vm.js, lib/internal/vm/ src/node_contextify.cc
wasi.md lib/wasi.js src/node_wasi.cc, deps/uvwasi/
webstreams.md lib/internal/webstreams/
worker_threads.md lib/worker_threads.js, lib/internal/worker/ src/node_worker.cc, src/node_messaging.cc
zlib.md, zlib_iter.md lib/zlib.js src/node_zlib.cc, deps/zlib/, deps/zstd/

Stability tags

Each section in doc/api/*.md carries a stability marker:

  • Stable (2): the highest level of guarantee. Backwards compatibility is preserved.
  • Legacy / Deprecated: still works but new code should use the replacement.
  • Experimental (1): may change between minors.
  • Strictly experimental (1.x): may change in any release.

The doctool (tools/doc/) parses these markers and renders them in the rendered docs and TOC.

Generated artefacts

  • HTML and JSON in out/doc/api/ after make doc.
  • node.1 man page (regenerated from cli.md by the doctool).
  • apilinks.json mapping API symbols → source file URLs.

Adding to the API surface

  • New module ⇒ create lib/<name>.js, lib/internal/<name>.js (or directory), register with node.gyp's library_files, and write doc/api/<name>.md.
  • New global ⇒ wire it in lib/internal/bootstrap/node.js (or lib/internal/bootstrap/web/) and document in doc/api/globals.md.
  • New CLI flag ⇒ add to src/node_options.cc, document in doc/api/cli.md. The flag is automatically reflected in the man page.
  • New error code ⇒ register in lib/internal/errors.js, document in doc/api/errors.md.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

API surface – Node.js wiki | Factory