{"action":"created","issue":{"url":"https://api.github.com/repos/nmccready/angular-simple-logger/issues/14","labels_url":"https://api.github.com/repos/nmccready/angular-simple-logger/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/nmccready/angular-simple-logger/issues/14/comments","events_url":"https://api.github.com/repos/nmccready/angular-simple-logger/issues/14/events","html_url":"https://github.com/nmccready/angular-simple-logger/issues/14","id":112530903,"number":14,"title":"angular-simple-logger is polluting the global namespace with local variables","user":{"login":"Lavan","id":735079,"avatar_url":"https://avatars.githubusercontent.com/u/735079?v=3","gravatar_id":"","url":"https://api.github.com/users/Lavan","html_url":"https://github.com/Lavan","followers_url":"https://api.github.com/users/Lavan/followers","following_url":"https://api.github.com/users/Lavan/following{/other_user}","gists_url":"https://api.github.com/users/Lavan/gists{/gist_id}","starred_url":"https://api.github.com/users/Lavan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lavan/subscriptions","organizations_url":"https://api.github.com/users/Lavan/orgs","repos_url":"https://api.github.com/users/Lavan/repos","events_url":"https://api.github.com/users/Lavan/events{/privacy}","received_events_url":"https://api.github.com/users/Lavan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-21T07:57:09Z","updated_at":"2015-10-21T13:37:38Z","closed_at":null,"body":"While looking at #13 I also noticed that many local variables in this package are accessible globally.\r\n\r\nIn the following method both key and val become global variables.\r\n\r\n```javascript\r\n    _isValidLogObject = function(logObject) {\r\n      var isValid;\r\n      isValid = false;\r\n      if (!logObject) {\r\n        return isValid;\r\n      }\r\n      for (key in _fns) {\r\n        val = _fns[key];\r\n        isValid = (logObject[val] != null) && typeof logObject[val] === 'function';\r\n        if (!isValid) {\r\n          break;\r\n        }\r\n      }\r\n      return isValid;\r\n    };\r\n```\r\n\r\nAs the default settings for CoffeeScript seems to be to generate local variables (with var statements) and from what I can see you haven't specified any strange options, I have no idea how it ends up like this here.\r\n"},"comment":{"url":"https://api.github.com/repos/nmccready/angular-simple-logger/issues/comments/149898067","html_url":"https://github.com/nmccready/angular-simple-logger/issues/14#issuecomment-149898067","issue_url":"https://api.github.com/repos/nmccready/angular-simple-logger/issues/14","id":149898067,"user":{"login":"nmccready","id":583593,"avatar_url":"https://avatars.githubusercontent.com/u/583593?v=3","gravatar_id":"","url":"https://api.github.com/users/nmccready","html_url":"https://github.com/nmccready","followers_url":"https://api.github.com/users/nmccready/followers","following_url":"https://api.github.com/users/nmccready/following{/other_user}","gists_url":"https://api.github.com/users/nmccready/gists{/gist_id}","starred_url":"https://api.github.com/users/nmccready/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmccready/subscriptions","organizations_url":"https://api.github.com/users/nmccready/orgs","repos_url":"https://api.github.com/users/nmccready/repos","events_url":"https://api.github.com/users/nmccready/events{/privacy}","received_events_url":"https://api.github.com/users/nmccready/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T13:37:38Z","updated_at":"2015-10-21T13:37:38Z","body":"Which version? The new releases are wrapped in a closure."}}