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

Testing foo instanceof Context is fugly #52

Open
soci-viii opened this issue Mar 27, 2012 · 1 comment
Open

Testing foo instanceof Context is fugly #52

soci-viii opened this issue Mar 27, 2012 · 1 comment

Comments

@soci-viii
Copy link

I've been using foo instanceof dust.makeBase({}).constructor: that seems clunky. I'd like a way to get the constructor directly, without having to instantiate an object: foo instanceof dust.Context.

Eliminating makeBase() altogether might also belong on the table here? Swapping the stack and global arguments would make Context operate very much like makeBase does now. Further, no external code at present relies on Context() directly; the only change required would be adding a couple null or undefined leading parameters in dust.js proper.

@soci-viii
Copy link
Author

I've posted commits for both resolutions. Thanks for your consideration.
https://github.com/socialtables/dustjs/commit/342d99cf3c90c92ca5d4dcc43782b7a900419a3f
https://github.com/socialtables/dustjs/commit/f00b69595f62e4c71627f6bb4e6a879272af4eec

The second has a pull request you are welcome to take if the change pleases you:
#53

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

1 participant