{"action":"created","issue":{"url":"https://api.github.com/repos/mholt/PapaParse/issues/176","labels_url":"https://api.github.com/repos/mholt/PapaParse/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/mholt/PapaParse/issues/176/comments","events_url":"https://api.github.com/repos/mholt/PapaParse/issues/176/events","html_url":"https://github.com/mholt/PapaParse/issues/176","id":59346946,"number":176,"title":"Cannot remove reference form global scope.","user":{"login":"Chyzwar","id":5990767,"avatar_url":"https://avatars.githubusercontent.com/u/5990767?v=3","gravatar_id":"","url":"https://api.github.com/users/Chyzwar","html_url":"https://github.com/Chyzwar","followers_url":"https://api.github.com/users/Chyzwar/followers","following_url":"https://api.github.com/users/Chyzwar/following{/other_user}","gists_url":"https://api.github.com/users/Chyzwar/gists{/gist_id}","starred_url":"https://api.github.com/users/Chyzwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chyzwar/subscriptions","organizations_url":"https://api.github.com/users/Chyzwar/orgs","repos_url":"https://api.github.com/users/Chyzwar/repos","events_url":"https://api.github.com/users/Chyzwar/events{/privacy}","received_events_url":"https://api.github.com/users/Chyzwar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-28T16:15:11Z","updated_at":"2015-02-28T20:14:27Z","closed_at":"2015-02-28T16:44:25Z","body":"One of possible pieces of code causing a problem. \r\n```javascript\r\n\tfunction FileStreamer(config)\r\n\t{\r\n\t\tconfig = config || {};\r\n\t\tif (!config.chunkSize)\r\n\t\t\tconfig.chunkSize = Papa.LocalChunkSize;\r\n\t\tChunkStreamer.call(this, config);\r\n```\r\n\r\nI am using a Papa in Angular application. I am wrapping a 3rd parties libraries in factory and remove reference in global scope. Papa is using a references to global scope inside. it is not possible to remove Papa from global scope without breaking a library itself. \r\n\r\nI think it is not very clear module pattern implementation. Overall I am happy with Papa.\r\n"},"comment":{"url":"https://api.github.com/repos/mholt/PapaParse/issues/comments/76543705","html_url":"https://github.com/mholt/PapaParse/issues/176#issuecomment-76543705","issue_url":"https://api.github.com/repos/mholt/PapaParse/issues/176","id":76543705,"user":{"login":"Chyzwar","id":5990767,"avatar_url":"https://avatars.githubusercontent.com/u/5990767?v=3","gravatar_id":"","url":"https://api.github.com/users/Chyzwar","html_url":"https://github.com/Chyzwar","followers_url":"https://api.github.com/users/Chyzwar/followers","following_url":"https://api.github.com/users/Chyzwar/following{/other_user}","gists_url":"https://api.github.com/users/Chyzwar/gists{/gist_id}","starred_url":"https://api.github.com/users/Chyzwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chyzwar/subscriptions","organizations_url":"https://api.github.com/users/Chyzwar/orgs","repos_url":"https://api.github.com/users/Chyzwar/repos","events_url":"https://api.github.com/users/Chyzwar/events{/privacy}","received_events_url":"https://api.github.com/users/Chyzwar/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T20:14:27Z","updated_at":"2015-02-28T20:14:27Z","body":"```javascript\r\n(function(global)\r\n{\r\n var Papa = {}\r\n.\r\n.\r\n.\r\nreturn Papa; \r\n});\r\n```\r\nThis will be also one variable in global scope. But contexts will be different.  \r\n\r\nhttp://eloquentjavascript.net/10_modules.html\r\nhttp://addyosmani.com/resources/essentialjsdesignpatterns/book/#modulepatternjavascript\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}