(jsfunc)
| 481 | |
| 482 | var sourceRegex = /^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/; |
| 483 | function parseJSFunc(jsfunc) { |
| 484 | // Match the body and the return value of a javascript function source |
| 485 | var parsed = jsfunc.toString().match(sourceRegex).slice(1); |
| 486 | return {arguments : parsed[0], body : parsed[1], returnValue: parsed[2]} |
| 487 | } |
| 488 | |
| 489 | // sources of useful functions. we create this lazily as it can trigger a source decompression on this entire file |
| 490 | var JSsource = null; |
no outgoing calls
no test coverage detected