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

Find a way to stop registering a global #282

Closed
wraithgar opened this issue Jan 4, 2016 · 2 comments
Closed

Find a way to stop registering a global #282

wraithgar opened this issue Jan 4, 2016 · 2 comments

Comments

@wraithgar
Copy link

The dbg variable that is attached to global by this module is making other projects that require this fail testing, when leaking globals are part of their test suite.

Is there any way that variable can be either optional, or removed from globals? I understand the reason is for aiding in console debugging but I can't help but think there's an alternative to that which doesn't require leaking globals.

@brycekahle
Copy link
Contributor

If you are using the browser built minified version, it should already have that removed. If you using it within a node environment, setting NODE_ENV to production will prevent it from being registered.

I've gone ahead and removed that line as well. I found a way to enable the debug using localStorage, so I don't need the global anymore.

@wraithgar
Copy link
Author

You're a saint, thank you so much. The NODE_ENV solution wasn't going to work in our use case cause that's set to test during node testing.

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