MCPcopy Create free account
hub / github.com/neplextech/vectorizer / collectNativeExportNames

Function collectNativeExportNames

scripts/postbuild.js:5–19  ·  view source on GitHub ↗
(jsBindings)

Source from the content-addressed store, hash-verified

3const EXPORT_MARKER = '// Auto-generated exports by postbuild.js. Do not edit directly.';
4
5function collectNativeExportNames(jsBindings) {
6 const names = [];
7 const seen = new Set();
8 const matches = jsBindings.matchAll(/module\.exports\.(\w+)/g);
9
10 for (const match of matches) {
11 const name = match[1];
12 if (!seen.has(name)) {
13 seen.add(name);
14 names.push(name);
15 }
16 }
17
18 return names;
19}
20
21function buildIndexJs(nativeExportNames) {
22 const originalSource = readFileSync('./index.js', 'utf-8');

Callers 1

postbuildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…