getbuiltinmodule-ponyfill
v1.0.1
Published
Call an async function with the semantics `globalThis.process.getBuiltinModule(…)` but with backwards compat for `bun` and old `node`.
Downloads
285
Readme
getbuiltinmodule-ponyfill
Call an async function with the semantics globalThis.process.getBuiltinModule(…)
but with backwards compat for bun
and old node
.
The implementation will be aliased to globalThis.process.getBuiltinModule
once the ecosystem has sufficient compatibility.
Usage
Example
import { getBuiltinModule } from "getbuiltinmodule-ponyfill";
const { Worker: NodeWorker } = await getBuiltinModule("node:worker_threads");