All fields

“Core Node.js Modules” in Information Technology

24 questions across 1 technology.

Information Technology

24 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is the difference between require() (CommonJS) and import (ES Modules) when loading Node.js's own core modules? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
2What does the node:events module's EventEmitter class provide, and what naming convention do most Node.js core APIs follow when using it? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
3What is the node: prefix for core module imports, and why was it introduced? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
4What does the node:os module provide, and what are some commonly used functions from it? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
5What does the URL/URLSearchParams API provide, and why is it generally preferred over the older querystring module today? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
6What does the node:path module provide, and why should you always use it instead of manually concatenating file path strings? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
7What does the node:zlib module provide, and how would you use it to compress an HTTP response? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
8What does the node:readline module provide, and what is a common use case for it? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
9What is the util module's inspect() function used for, and how does it relate to how console.log() displays objects? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
10What does the node:crypto module provide, and what's the difference between hashing and encryption? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
11What does the node:assert module provide, and how does it differ in purpose from a full testing framework? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
12What does the node:util.types module provide, and how does it differ from JavaScript's built-in typeof operator? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
13What is the node:stream module's Transform stream, and how does it differ from a Readable or Writable stream? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesAdvanced
14What is the node:vm module, and what are the security implications of using it to execute untrusted code? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesAdvanced
15What does the node:perf_hooks module provide, and how would you use it to measure precise execution time of a code block? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesAdvanced
16What is Node.js, and how does it differ fundamentally from running JavaScript in a web browser? Node.js › Node.js Fundamentals & Runtime ArchitectureNode.jsNode.js Fundamentals & Runtime ArchitectureBeginner
17How would you make an outgoing HTTP request from Node.js using the built-in fetch API versus the older http.request()? Node.js › HTTP & HTTPS ModulesNode.jsHTTP & HTTPS ModulesAdvanced
18How would you create a basic HTTP server using only Node's built-in node:http module, without a framework like Express? Node.js › HTTP & HTTPS ModulesNode.jsHTTP & HTTPS ModulesBeginner
19How do you convert a Node.js callback-based function into a Promise-based one manually, without using util.promisify()? Node.js › Async PatternsNode.jsAsync PatternsBeginner
20What is the difference between throwing an error synchronously and calling a callback with an error as its first argument in Node.js? Node.js › Error HandlingNode.jsError HandlingBeginner
21What is Mongoose, and what does it add on top of the raw MongoDB Node.js driver? Node.js › Databases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Node.jsDatabases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Beginner
22What is util.promisify(), and when would you still need it in modern Node.js? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
23How would you implement a file-watching feature in Node.js using fs.watch(), and what are its known cross-platform limitations? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
24What is the purpose of the 'node:timers/promises' module, and how does it simplify working with delays in async code? Node.js › Async PatternsNode.jsAsync PatternsBeginner