UNPKG

telefunc

Version:

Remote functions. Instead of API.

15 lines (14 loc) 441 B
export { getExportList }; import { init, parse } from 'es-module-lexer'; async function getExportList(src) { await init; const parseResult = parse(src); const exports = parseResult[1]; const exportList = exports.map((e) => { var _a; const exportName = e.n; const localName = (_a = e.ln) !== null && _a !== void 0 ? _a : null; return { exportName, localName }; }); return exportList; }