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

Nit: Our use of function.name might be unnecessary #34

Open
tylersticka opened this issue May 6, 2016 · 1 comment
Open

Nit: Our use of function.name might be unnecessary #34

tylersticka opened this issue May 6, 2016 · 1 comment

Comments

@tylersticka
Copy link
Member

@mrgerardorodriguez asked a good question in this thread:

For my own curiosity, how is capitalize.name resolving to the proper name?

I didn't have an answer, but here is @erikjung's response (source):

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name

But now that you mention it, it's kind of silly to use name on a reference that happens to be using the same value as its own identifier. It would make more sense if we were doing this:

const helper = require('path/to/helper');

Handlebars.registerHelper(helper.name, helper);
@spaceninja
Copy link
Member

@gerardo-rodriguez is there any action to be taken here?

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

No branches or pull requests

2 participants