{"action":"opened","issue":{"url":"https://api.github.com/repos/TEAMMATES/repo/issues/3978","labels_url":"https://api.github.com/repos/TEAMMATES/repo/issues/3978/labels{/name}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/issues/3978/comments","events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/3978/events","html_url":"https://github.com/TEAMMATES/repo/issues/3978","id":94902845,"number":3978,"title":"Move utility functions in common.js into a util object","user":{"login":"junhaoyap","id":6291947,"avatar_url":"https://avatars.githubusercontent.com/u/6291947?v=3","gravatar_id":"","url":"https://api.github.com/users/junhaoyap","html_url":"https://github.com/junhaoyap","followers_url":"https://api.github.com/users/junhaoyap/followers","following_url":"https://api.github.com/users/junhaoyap/following{/other_user}","gists_url":"https://api.github.com/users/junhaoyap/gists{/gist_id}","starred_url":"https://api.github.com/users/junhaoyap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junhaoyap/subscriptions","organizations_url":"https://api.github.com/users/junhaoyap/orgs","repos_url":"https://api.github.com/users/junhaoyap/repos","events_url":"https://api.github.com/users/junhaoyap/events{/privacy}","received_events_url":"https://api.github.com/users/junhaoyap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TEAMMATES/repo/labels/a-FaultTolerance","name":"a-FaultTolerance","color":"E6CCFF"},{"url":"https://api.github.com/repos/TEAMMATES/repo/labels/a-Performance","name":"a-Performance","color":"E6CCFF"},{"url":"https://api.github.com/repos/TEAMMATES/repo/labels/d.Moderate","name":"d.Moderate","color":"8099FF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-14T09:19:50Z","updated_at":"2015-07-14T09:19:50Z","closed_at":null,"body":"We can do it like below:\r\n\r\n(function(window) {\r\n'use strict';\r\nvar util = {\r\nadd: function(a, b) {\r\nreturn a + b;\r\n}\r\n}\r\n\r\nwindow.util = util;\r\n})(window));\r\n\r\n\r\nReduces global namespace pollution and allows for enabling strict mode."}}