Step 3 / Select topic Node.js Hard

What this bank covers

  • Immediates scheduled from the check phase
  • Zero-delay timers are clamped to 1 ms
  • Timeout delay overflow
  • nextTick between two expired timers
  • unref'd timers and process lifetime
  • Cancelling a timer that is due in the same phase
  • Microtasks between expired timer callbacks
  • Hex decoding stops at the first unusable character
  • subarray returns a view, not a copy
  • base64url uses -_ and omits padding
  • Buffer.from(TypedArray) copies the bytes
  • Array values are coerced modulo 256
  • Signed little-endian reads
  • utf16le uses two bytes per code unit
  • buf.write never writes a partial character
  • 'ascii' is latin1 on write, high-bit stripped on read
  • Buffer.concat honours totalLength exactly
  • Immediate queue snapshot and the nextTick queue
  • Zero-millisecond timers are clamped to 1 ms
  • nextTick and microtasks between setImmediate callbacks
  • Removing a listener during emit
  • Adding a listener while emitting
  • listeners() vs rawListeners() for once
  • removeListener with a duplicated handler
  • Unhandled 'error' events
  • emit() return value with once()
  • The newListener meta-event
  • events.once() resolution value
  • When does once() unregister?
  • captureRejections and async listeners
  • write() return value and the highWaterMark
  • setEncoding and split multi-byte sequences
  • Ordering of writes, 'end' and 'finish' in a pipe
  • Duplex half-open behaviour
  • Breaking out of for await over a Readable
  • pipeline() error propagation and cleanup
  • read(n) across buffered chunks
  • cork/uncork needs _writev to batch
  • Readable.from() with a string
  • Writable backpressure in object mode
  • truncateSync can grow a file
  • readSync position argument and the file offset
  • Writing past end of file with writeSync
  • The exclusive open flag 'wx'
  • readdirSync with withFileTypes
  • Overwriting in place with 'r+' and writeSync
  • Return value of recursive mkdirSync
  • truncate to a length larger than the file
  • Positional writeSync on a descriptor opened with 'a'
  • statSync versus lstatSync on a symbolic link
  • path.extname edge cases
  • path.relative walks up to the common root
  • Relative URL resolution against a base
  • WHATWG URL normalization rules
  • URLSearchParams serialization
  • pathToFileURL escaping
  • isAbsolute differs per platform flavor
  • join does not restart at an absolute segment
  • path.parse on a dotfile
  • searchParams mutations are live on the URL
  • exports rebinding vs module.exports
  • Circular require returns partial exports
  • require.cache and re-evaluation
  • The CommonJS module wrapper arity
  • Requiring a JSON file
  • createRequire resolves relative to the filename's directory
  • Directory resolution via package.json main
  • require.cache controls module re-execution
  • Extension resolution order for extensionless requires
  • A module that throws is not left in require.cache
  • events.errorMonitor
  • Promise.any rejection shape
  • Error cause option
  • libuv error properties
  • Abort errors
  • Error-first callbacks
  • Error cause is non-enumerable
  • AssertionError.generatedMessage
  • try/catch cannot catch async callback throws
  • Env values are always strings
  • Assigning undefined to process.env
  • Deleting environment variables
  • process.argv[0] and execPath
  • Copying process.env is a snapshot
  • Environment keys are case-sensitive on POSIX
  • process.version versus process.versions.node
  • process.hrtime and hrtime.bigint
  • process.chdir and process.cwd
  • process.env coerces every value to a string
  • Awaiting a thenable costs an extra tick
  • Returning a promise from an async function
  • util.promisify.custom wins over callback wrapping
  • Breaking out of for await closes the async iterator
  • nextTick scheduled from inside a microtask
  • AsyncLocalStorage propagation
  • Promise.all receives promises, not functions
  • events.once rejects on an error event
  • for await over an array of promises
  • Aborting an events.once promise