-
Notifications
You must be signed in to change notification settings - Fork 70
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
using helpers as well as filters in combination.... #75
Comments
@zaphod1984 sould you give a code example of how you are using them? |
sure, no problem:
when requiring, the lib checks for a global available dust instance, if not available, it requires dust and exports it. (https://github.com/linkedin/dustjs-helpers/blob/master/lib/dust-helpers.js#L514) the filters module does the same. i do realize that both of the modules rely on dust being a singleton but it would be much nicer if both would behave the same and the enhancment with helpers and filters would be done in a more explizit way. |
By the filters module, do you mean this: |
exactly. a sane way without clobbering the global namespace would be something like this:
|
+1. The way that helpers currently works is nonsensical - if they are indeed helpers then they should augment dust, not just clobber it. ie:
|
...does not work, at least not in a commonJs environment as the bootstrapping function relies on a global available dust instance.
The text was updated successfully, but these errors were encountered: