getNodeRuntimeJS returns the unenv node runtime by the given name.
(name string)
| 28 | |
| 29 | // getNodeRuntimeJS returns the unenv node runtime by the given name. |
| 30 | func 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. |
| 39 | func loadNodeRuntime() (err error) { |
no test coverage detected