function-regex
function-regex copied to clipboard
Function regex. Regular expression for matching function parts. Expose match groups for function name, arguments and function body.
Results
2
function-regex issues
Sort by
recently updated
recently updated
newest added
Does it handle arrow functions?
There are several issues with the regex: - It doesn't handle embedded comments - It considers `functionfoo () { }` to be a valid function declaration - Nit: `\{([\w\W\s\S]*)\}` is...