{"action":"created","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/915","labels_url":"https://api.github.com/repos/lodash/lodash/issues/915/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/915/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/915/events","html_url":"https://github.com/lodash/lodash/issues/915","id":56245341,"number":915,"title":"Uncaught ReferenceError: global is not defined","user":{"login":"nikku","id":58601,"avatar_url":"https://avatars.githubusercontent.com/u/58601?v=3","gravatar_id":"","url":"https://api.github.com/users/nikku","html_url":"https://github.com/nikku","followers_url":"https://api.github.com/users/nikku/followers","following_url":"https://api.github.com/users/nikku/following{/other_user}","gists_url":"https://api.github.com/users/nikku/gists{/gist_id}","starred_url":"https://api.github.com/users/nikku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikku/subscriptions","organizations_url":"https://api.github.com/users/nikku/orgs","repos_url":"https://api.github.com/users/nikku/repos","events_url":"https://api.github.com/users/nikku/events{/privacy}","received_events_url":"https://api.github.com/users/nikku/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-02T14:49:59Z","updated_at":"2015-02-02T16:50:22Z","closed_at":"2015-02-02T16:50:22Z","body":"It is not save to rely on `global` being available in browserified bundles (i.e. users may choose to [disable insertion of global variables](https://github.com/substack/node-browserify#var-b--browserifyfiles-or-opts) to keep the bundle minimal.\r\n\r\nIn case browserify (or webpack) did not expose a `global` variable [support.js](https://github.com/lodash/lodash-node/blob/master/modern/support.js#L10) throws an error saying\r\n\r\n```\r\nUncaught ReferenceError: global is not defined\r\n```\r\n\r\nI am not sure what the right approach would be to solve this issue. I would probably check for `window` as a global variable because that should (_?_) always be available in DOM environments."},"comment":{"url":"https://api.github.com/repos/lodash/lodash/issues/comments/72491369","html_url":"https://github.com/lodash/lodash/issues/915#issuecomment-72491369","issue_url":"https://api.github.com/repos/lodash/lodash/issues/915","id":72491369,"user":{"login":"jdalton","id":4303,"avatar_url":"https://avatars.githubusercontent.com/u/4303?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T16:50:22Z","updated_at":"2015-02-02T16:50:22Z","body":"> `global` is the conventional root in commonJS thought. It may be safe to assume users do not exclude it unless they know what they are doing.\r\n\r\nRight and the [lodash-node](https://github.com/lodash/lodash-node) bundle is a build of lodash exported as Node.js/io.js modules."}}