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

Improve Node.js module/require detection #76

Closed
wants to merge 1 commit into from
Closed

Improve Node.js module/require detection #76

wants to merge 1 commit into from

Conversation

ticky
Copy link

@ticky ticky commented Apr 23, 2014

- improves support for environments which include `module` but are not Node.js environments
- fixes #51 "can't be used in karma tests for angular"
@pschuegr
Copy link

Would be great to get this pulled in :)

@mikeacook
Copy link

This also fixes an issue when using moment-timezone in code running under the jasmine-maven-plugin.

LGTM 👍

@grEvenX
Copy link

grEvenX commented Jun 16, 2014

👍

@timrwood
Copy link
Member

I wonder if it would be better to switch to the umd returnExports pattern and use typeof exports === 'object'. I'm not sure if it would has any of the same issues as typeof module !== 'undefined'.

@timrwood timrwood mentioned this pull request Jun 16, 2014
@timrwood
Copy link
Member

See #92 for an alternate solution.

@timrwood
Copy link
Member

Closing in favor of #92.

@timrwood timrwood closed this Jun 18, 2014
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.

can't be used in karma tests for angular
5 participants