MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / tryDynamicRequire

Function tryDynamicRequire

packages/native/loader.cjs:7–15  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

5const tried = [];
6
7function tryDynamicRequire(file) {
8 tried.push(file);
9 try {
10 return require(`./${file}`);
11 } catch (err) {
12 lastErr = err;
13 return null;
14 }
15}
16
17if (process.platform === "linux" && process.arch === "x64") {
18 tried.push("rezi_ui_native.linux-x64-gnu.node");

Callers 1

loader.cjsFile · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected