Skip to content

Commit

Permalink
update such that function names of only disallowed chars dont transla…
Browse files Browse the repository at this point in the history
…te to blank
  • Loading branch information
santiago-elustondo committed Jun 5, 2018
1 parent 34aff63 commit b2ade71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/function-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const functionName = (fn: Function): string => {
name = 'anonymous';
}

name = name.replace(/[^\w]/gi, '');
name = name.replace(/[^\w]/gi, '_');

if (!isNaN(parseInt(name[0], 10))) {
name = '__num_' + name[0];
Expand Down

0 comments on commit b2ade71

Please sign in to comment.