Node.js assert module — strict vs legacy mode, AssertionError, deep equality, throws/rejects, and Assert instances.
Reference
Node.js Modules
Core Node.js modules and APIs.
- assert
- Buffer
Work with binary data in Node.js using the Buffer class. Covers memory allocation, numeric reads and writes, encoding conversions, and TypedArray interop.
- child_process
Spawn subprocesses and run shell commands in Node.js with the child_process module's spawn, exec, fork, and sync APIs.
- child_process module
Node.js child_process module for spawning external processes, executing shell commands, and forking Node.js processes.
- cluster
Reference for node:cluster: cluster.fork, setupPrimary, isPrimary, Worker events, scheduling policies, and graceful shutdown.
- crypto module
Node.js crypto module for cryptographic operations including hashing, ciphers, HMAC signing, key derivation, and cryptographically secure random generation.
- diagnostics_channel
Node.js diagnostics_channel module: named pub/sub channels for libraries to publish structured diagnostic data and APM tools to subscribe to it.
- events module
Node.js events module for event-driven architecture. The EventEmitter class for emitting and handling custom events.
- fs module
Node.js fs module for file I/O, directory management, and file watching, with callback, synchronous, and promise-based APIs.
- fs/promises module
Promise‑based file system API for Node.js. All fs functions return promises, enabling clean async/await code without callbacks.
- node:http
The node:http module provides HTTP server and client functionality in Node.js, built on streams for handling requests, responses, routing, and JSON APIs.
- node:https
Node.js HTTPS client and server module with TLS/SSL encryption, custom certificate authorities, mutual TLS authentication, and secure API requests.
- node:test
Node.js built-in test runner with test()/it(), suites, hooks, subtests, mocks, mock timers, snapshot assertions, code coverage, and CLI flags.
- node:url
Node.js URL parsing, resolution, and manipulation with the WHATWG URL class. Covers URL construction, query string handling, relative resolution and validation.
- os module
The os module provides operating system-related utility methods for accessing platform information, CPU architecture, memory, and network interfaces.
- path module
The path module provides utilities for working with file and directory paths in a way that works across different operating systems.
- process
The process object provides information about and control over the current Node.js process, including argv, env, and methods to exit or signal the process.
- readline module
Node.js readline module for reading streams line by line, building interactive command-line interfaces, and processing large files efficiently in Node.js.
- stream
Comprehensive reference for Node.js streams covering readable, writable, transform, and duplex streams with backpressure handling and pipeline patterns.
- timers
Node.js timers module: setTimeout, setInterval, setImmediate, plus the timers/promises Promise-based API and the Timeout class.
- worker_threads
Node.js worker_threads module: Worker, MessageChannel, MessagePort, BroadcastChannel, and helpers for CPU-bound JavaScript tasks.