MCPcopy
hub / github.com/webpack/webpack / getCountImportedFunc

Function getCountImportedFunc

lib/wasm-sync/WebAssemblyGenerator.js:96–108  ·  view source on GitHub ↗
(ast)

Source from the content-addressed store, hash-verified

94 * @returns {number} - count
95 */
96const getCountImportedFunc = (ast) => {
97 let count = 0;
98
99 t.traverse(ast, {
100 ModuleImport({ node }) {
101 if (t.isFuncImportDescr(node.descr)) {
102 count++;
103 }
104 }
105 });
106
107 return count;
108};
109
110/**
111 * Get next type index

Callers 1

generateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected