Skip to content

Commit

Permalink
refactor(utils): use a more robust method for function stringifying
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Jun 7, 2018
1 parent 508b5ef commit 295ef9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bson/parser/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @param {Function} fn The function to stringify
*/
function normalizedFunctionString(fn) {
return fn.toString().replace('function(', 'function (');
return fn.toString().replace(/function *\(/, 'function (');
}

module.exports = {
Expand Down

0 comments on commit 295ef9a

Please sign in to comment.