Standard library
The APIs that make sense for CLI tools and microservices — real servers, real files, real crypto — plus the browser-shaped ones that work off-browser.
HTTP server
http.listen is at 100% coverage. It transparently accepts cleartext HTTP/2 (h2c) alongside HTTP/1.1 on the same port.
// The real Node.js shape — this file runs unchanged under Node too.
import http from 'http'
const server = http.createServer((req: IncomingMessage, res: ServerResponse) => {
res.setHeader('Content-Type', 'text/plain')
if (req.url === '/hello') {
res.writeHead(200)
res.end('hello from a native binary')
return
}
res.writeHead(404)
res.end('not found: ' + req.url)
})
server.listen(8080)fetch
fetch, Request, Response and Headers are in. .text()/.json()/.arrayBuffer() are synchronous, and .json() parses a body straight into a declared type.
const r = await fetch('http://127.0.0.1:8765/get')
console.log(r.status) // 200
console.log(r.ok) // true
interface Ip { origin: string }
// .json() parses the body straight into a declared type
const data = r.json() as Ip
console.log(data.origin)File system
fs reads and writes (~93%). Sync and async-shaped variants exist; async runs blocking I/O under the hood. readFileSync/writeFileSync are text-first — use the binary-aware readFileSyncBytes for binary data.
import { readFileSync, writeFileSync } from 'fs'
const config: string = readFileSync('config.json')
writeFileSync('out.txt', 'done\n')Concurrency & workers
worker_threads and cluster give you real OS threads and processes, each running its own event loop and talking over message channels. Shared memory (SharedArrayBuffer/Atomics) is available too.
Web Crypto
A complete crypto.subtle surface over a selectable backend (OpenSSL or Apple CommonCrypto): digest, HMAC, AES-GCM/CBC, RSA-OAEP/PSS, ECDSA, PBKDF2/HKDF, key formats raw/pkcs8/spki/jwk.
The rest
| Area | Notes |
|---|---|
| Streams | Web + Node streams (options form and class X extends Readable/Writable), 100% |
URL / URLSearchParams | 100% (one value per key) |
WebSocket / SSE | Client & server; client speaks wss:// |
events (EventEmitter) | 100%, single payload type per emitter |
path / os | 100% (POSIX; Linux + Apple Silicon verified) |
net / dns / dgram / tls / http2 / https / zlib | Done (tls = client + server; http2 = h2c server + client sessions; https = client); vm not started |
node:test | The test runner — test/describe, subtests, hooks, TAP output, non-zero exit on failure |
diagnostics_channel | Named pub/sub (string messages) |