feat(params): update regex to match functions with parameters

Previously the regex only matched `function () {` as the beginning function declaration.
Now function declarations like `function (argument) {` are also detected.