MCPcopy Create free account
hub / github.com/Noumena-Network/code / loadBinding

Function loadBinding

src/shims/sharp/sharpBinding.cjs:20–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18let cachedBinding;
19
20function loadBinding() {
21 if (cachedBinding !== undefined) {
22 return cachedBinding;
23 }
24
25 const runtimeAssets = resolveRuntimeAssets();
26 if (!runtimeAssets) {
27 throw new Error(
28 `sharp native runtime in this build targets linux-x64 and linux-x64-musl; received ${process.platform}-${process.arch}`,
29 );
30 }
31
32 cachedBinding = loadEmbeddedSharp(runtimeAssets);
33 return cachedBinding;
34}
35
36module.exports = loadBinding();

Callers 1

sharpBinding.cjsFile · 0.70

Calls 2

resolveRuntimeAssetsFunction · 0.85
loadEmbeddedSharpFunction · 0.85

Tested by

no test coverage detected