MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / install

Function install

src/platform/bun-hyperscript.js:26–43  ·  view source on GitHub ↗
(target, source, args, runtime)

Source from the content-addressed store, hash-verified

24 }
25 return {
26 async install(target, source, args, runtime) {
27 let resolved = id;
28 if (resolved.startsWith('./') || resolved.startsWith('../')) {
29 resolved = path.join(args.module.dir, resolved);
30 }
31 let mod;
32 if (resolved.endsWith(hsExt)) {
33 mod = await run(resolved);
34 } else {
35 const file = Bun.file(resolved + hsExt);
36 if (await file.exists()) {
37 mod = await run(resolved + hsExt);
38 } else {
39 mod = await import(resolved);
40 }
41 }
42 runtime.assignToNamespace(target, [], name, mod);
43 }
44 };
45});
46

Callers

nothing calls this directly

Calls 2

runFunction · 0.70
assignToNamespaceMethod · 0.45

Tested by

no test coverage detected