MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / getPrebuildPath

Function getPrebuildPath

lib/binding.js:41–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41function getPrebuildPath() {
42 if (PREBUILD_PLATFORMS.includes(process.platform) && PREBUILD_ARCHS.includes(process.arch)) {
43 const target = `${isLinuxMusl() ? 'linuxmusl' : process.platform}-${process.arch}`;
44 const filename = path.join(__dirname, '..', 'prebuilds', `${target}.node`);
45 if (fs.existsSync(filename)) {
46 return filename;
47 }
48 }
49 return null;
50}
51
52function isLinuxMusl() {
53 return process.platform === 'linux' && !process.report.getReport().header.glibcVersionRuntime;

Callers 2

getBindingFunction · 0.85
binding.jsFile · 0.85

Calls 1

isLinuxMuslFunction · 0.85

Tested by

no test coverage detected