Node.js process.platform and arch values go beyond the docs
Node.js docs list a limited set of process.platform/arch values, but digging into the C++ source and GYP build system reveals a much wider real-world list.
Node.js's official documentation lists only 7 possible process.platform values and 10 process.arch values. A developer traced through Node.js's C++ source (node_*.cc files), the GYP build system, and the configure.py script to show this list is incomplete. process.platform is actually derived at build time from the NODE_PLATFORM macro, which pulls from GYP's OS variable — itself determined via a sys.platform check that can resolve to netbsd, os390, android, os400, ios, openharmony, emscripten, wasm, wasi, or cloudabi, among others. Similarly, process.arch can include undocumented values like mips64el and riscv32.
The piece matters because it shows that even a widely-used platform like Node.js can have official API documentation that doesn't fully reflect real-world behavior. Developers writing conditional logic based on process.platform or process.arch should be aware of this gap — particularly relevant for cross-compilation targets, embedded systems, or WebAssembly builds where undocumented platform strings may appear.