{"action":"created","issue":{"url":"https://api.github.com/repos/primus/eventemitter3/issues/22","labels_url":"https://api.github.com/repos/primus/eventemitter3/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/primus/eventemitter3/issues/22/comments","events_url":"https://api.github.com/repos/primus/eventemitter3/issues/22/events","html_url":"https://github.com/primus/eventemitter3/issues/22","id":59412541,"number":22,"title":"Doesn't work without CommonJS","user":{"login":"ivw","id":6696685,"avatar_url":"https://avatars.githubusercontent.com/u/6696685?v=3","gravatar_id":"","url":"https://api.github.com/users/ivw","html_url":"https://github.com/ivw","followers_url":"https://api.github.com/users/ivw/followers","following_url":"https://api.github.com/users/ivw/following{/other_user}","gists_url":"https://api.github.com/users/ivw/gists{/gist_id}","starred_url":"https://api.github.com/users/ivw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivw/subscriptions","organizations_url":"https://api.github.com/users/ivw/orgs","repos_url":"https://api.github.com/users/ivw/repos","events_url":"https://api.github.com/users/ivw/events{/privacy}","received_events_url":"https://api.github.com/users/ivw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-01T19:09:15Z","updated_at":"2015-03-01T21:36:07Z","closed_at":null,"body":"When you only want to include the index.js in your html, to use it without node/browserify, it will give an error because `module` is not defined.\r\n\r\nThe way other libraries (like eventemitter2) handle this is checking if module or exports exist:\r\nhttp://stackoverflow.com/questions/12571737/module-exports-client-side\r\nhttp://www.matteoagosti.com/blog/2013/02/24/writing-javascript-modules-for-both-browser-and-node/\r\n"},"comment":{"url":"https://api.github.com/repos/primus/eventemitter3/issues/comments/76632318","html_url":"https://github.com/primus/eventemitter3/issues/22#issuecomment-76632318","issue_url":"https://api.github.com/repos/primus/eventemitter3/issues/22","id":76632318,"user":{"login":"3rd-Eden","id":28071,"avatar_url":"https://avatars.githubusercontent.com/u/28071?v=3","gravatar_id":"","url":"https://api.github.com/users/3rd-Eden","html_url":"https://github.com/3rd-Eden","followers_url":"https://api.github.com/users/3rd-Eden/followers","following_url":"https://api.github.com/users/3rd-Eden/following{/other_user}","gists_url":"https://api.github.com/users/3rd-Eden/gists{/gist_id}","starred_url":"https://api.github.com/users/3rd-Eden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3rd-Eden/subscriptions","organizations_url":"https://api.github.com/users/3rd-Eden/orgs","repos_url":"https://api.github.com/users/3rd-Eden/repos","events_url":"https://api.github.com/users/3rd-Eden/events{/privacy}","received_events_url":"https://api.github.com/users/3rd-Eden/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T21:36:07Z","updated_at":"2015-03-01T21:36:07Z","body":"Sure, but I don't want to pollute my files with pointless code that I'm not and most of the people are not using. All these patterns add pointless bloat that why i've adapted one pattern that can be compiled reasonably easy in to different formats. "}}