Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more implicit function naming examples to "keep names" section #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

overlookmotel
Copy link

This adds a few more examples of implicit function naming to the "keep names" section.

I suppose given the final case, "the name property on functions defaults to a nearby identifier" doesn't quite describe where the name comes from, as 'f' + 'n' is not an identifier. But I'm not sure what a better phrasing is.

minify doesn't do anything which would change the function name in these cases, so keepNames doesn't need to handle it. Though in future if minify condensed {x: 1}.x to just 1, as Terser does, keepNames would need to deal with this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant