Scripts: Code refractor For function parseRequestedNames#23135
Conversation
…any fucntionality or fix any bugs, I tried to do a refractor through removing the for loop, Using built-in functions of Js along with very few variales declared, this makes the code more readable
|
Comparing: 3dc41d8...0a65eb2 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
| return name.toUpperCase(); | ||
| } else if (toCase === 'lowercase') { | ||
| name = name.toLowerCase(); | ||
| return name.toLowerCase(); |
There was a problem hiding this comment.
You don't need else after return
| } | ||
| return result; | ||
| }) | ||
| .filter(name => !!name); |
There was a problem hiding this comment.
I think this filter should happen before the map
|
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. |
|
Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you! |
This change is just a little code refractor I tried , this surely makes the code more easy to read , and we have few variables than earlier