The node: prefix explicitly signals a built-in core module rather than a third-party package -- introduced partly to remove ambiguity in module resolution and support scenarios where explicitly distinguishing core modules from userland packages matters; older unprefixed requires still work for compatibility.
A team adopts the node: prefix so a linter rule can flag accidental shadowing of a core module name by a local file, making core-module imports visually unambiguous.
Likely follow-ups
Is the node: prefix required or merely a stylistic convention currently?
Are there core modules that specifically require the node: prefix?
util.inspect() converts a value into a formatted, human-readable string, including nested objects -- it's what console.log() uses internally (rather than JSON.stringify, which can't handle circular references or non-JSON types), and can be called directly for custom formatting needs like controlling nesting depth.
A logging utility uses util.inspect() with a bounded depth to safely log deeply nested request objects without crashing on a circular reference, which JSON.stringify would throw on.
Likely follow-ups
Why does JSON.stringify() throw on a circular reference while console.log() handles it gracefully?
How would you define a custom inspection format using util.inspect.custom?
The path module provides platform-aware utilities -- join(), resolve(), dirname(), extname() -- that correctly handle the difference between path separators on different OSes, whereas manual string concatenation with a hardcoded '/' would break on Windows.
A CLI tool that manually concatenated paths worked on macOS but broke on Windows until every path operation was replaced with path.join(), which uses the correct separator per OS.
Likely follow-ups
What's the difference between path.join() and path.resolve() regarding relative versus absolute output?
How does path.normalize() clean up redundant segments like '../'?
File System (fs) ModuleCLI Tools & Scripting with Node.js
crypto provides hashing (createHash), symmetric/asymmetric encryption, HMAC signing, and secure random generation. Hashing is one-way, producing a fixed-size fingerprint that can't be reversed; encryption is reversible, transforming data into ciphertext decryptable back to plaintext given the correct key.
A file-integrity checker computes a SHA-256 hash to verify a download wasn't corrupted, while a separate feature encrypts stored API credentials with AES-256-GCM so they can be decrypted later.
Likely follow-ups
Why is crypto.randomBytes() preferred over Math.random() for security-sensitive values?
What does 'GCM' in AES-256-GCM provide beyond basic encryption?
URL and URLSearchParams (globally available, matching the browser API) provide a complete, spec-compliant way to parse a URL and manipulate query strings, handling edge cases like encoding more consistently than the legacy querystring module.
const url = new URL('https://example.com/search?q=nodejs');
console.log(url.searchParams.get('q'));
const params = new URLSearchParams();
params.append('name', 'Alice');
Real-world example
An HTTP client builds request query strings using URLSearchParams rather than manual concatenation, automatically getting correct percent-encoding of special characters.
Likely follow-ups
In what situations does the legacy querystring module still get used in modern codebases?
How does URLSearchParams handle a parameter appearing multiple times with the same key?
HTTP & HTTPS ModulesRESTful API Design with Express
assert provides basic assertion functions that throw an AssertionError when unmet -- a low-level building block used as the assertion layer inside test suites, but it doesn't provide test organization, running, or reporting the way a full framework like Jest does.
A Transform stream is both readable and writable, taking input, transforming it (via a required _transform() method), and making the result readable out the other side -- unlike a plain Readable or Writable, it sits naturally in the middle of a pipeline, standard for compression, encryption, or format conversion as streaming steps.
A log-processing pipeline pipes raw log lines through a custom Transform that redacts sensitive fields, processed incrementally without loading the entire file into memory.
Likely follow-ups
What is the difference between a Transform stream's 'transform' mode and its 'flush' behavior?
How would you implement a Transform that buffers multiple chunks before producing output, like a line-splitter?
zlib provides compression/decompression (gzip, deflate, Brotli) -- commonly used to compress HTTP responses reducing bandwidth, with Accept-Encoding indicating client support, though in Express this is typically handled via the compression middleware.
An API serving large JSON payloads adds the compression middleware, reducing typical response sizes by 70-80% and improving load times on slower connections.
Likely follow-ups
How does Brotli compare to gzip in compression ratio and CPU cost?
When might compressing a response hurt performance, such as for already-compressed binary content?
vm compiles and runs JavaScript within a separate V8 context, often for sandboxing -- but its isolation is not a genuine hardened security boundary, since code running inside can, through known techniques, escape into the surrounding process in certain configurations, so it shouldn't be the sole defense for truly untrusted code.
A low-code platform initially ran user formula scripts via vm alone, but moved to a separate resource-limited child process after a security review found vm's isolation alone insufficient.
Likely follow-ups
What are documented ways code can escape a vm context?
What are more robust alternatives like isolated-vm or a separate process/container?