MCPcopy
hub / github.com/jvilk/BrowserFS / parseJSFunc

Function parseJSFunc

test/tests/emscripten/bad_lookup.js:444–448  ·  view source on GitHub ↗
(jsfunc)

Source from the content-addressed store, hash-verified

442
443 var sourceRegex = /^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;
444 function parseJSFunc(jsfunc) {
445 // Match the body and the return value of a javascript function source
446 var parsed = jsfunc.toString().match(sourceRegex).slice(1);
447 return {arguments : parsed[0], body : parsed[1], returnValue: parsed[2]}
448 }
449 var JSsource = {};
450 for (var fun in JSfuncs) {
451 if (JSfuncs.hasOwnProperty(fun)) {

Callers 1

bad_lookup.jsFile · 0.70

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected