Open this example in the interactive library
Source code
import {
builtinModules,
isBuiltin,
createRequire,
syncBuiltinESMExports,
} from "node:module";
import { pathToFileURL } from "node:url";
console.log(builtinModules.filter((name) => name.startsWith("stream/")).sort());
Sample output
[ 'stream/consumers', 'stream/promises', 'stream/web' ]
