MCPcopy
hub / github.com/esm-dev/esm.sh / getNodeRuntimeJS

Function getNodeRuntimeJS

server/unenv.go:30–36  ·  view source on GitHub ↗

getNodeRuntimeJS returns the unenv node runtime by the given name.

(name string)

Source from the content-addressed store, hash-verified

28
29// getNodeRuntimeJS returns the unenv node runtime by the given name.
30func getNodeRuntimeJS(name string) (js []byte, ok bool) {
31 doOnce("load-node-runtime", func() (err error) {
32 return loadNodeRuntime()
33 })
34 js, ok = unenvNodeRuntimeMap[name]
35 return
36}
37
38// loadNodeRuntime loads the unenv node runtime from the embed filesystem.
39func loadNodeRuntime() (err error) {

Callers 2

StartFunction · 0.85
esmRouterFunction · 0.85

Calls 2

doOnceFunction · 0.85
loadNodeRuntimeFunction · 0.85

Tested by

no test coverage detected