{"action":"opened","issue":{"url":"https://api.github.com/repos/jashkenas/underscore/issues/2150","labels_url":"https://api.github.com/repos/jashkenas/underscore/issues/2150/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/underscore/issues/2150/comments","events_url":"https://api.github.com/repos/jashkenas/underscore/issues/2150/events","html_url":"https://github.com/jashkenas/underscore/issues/2150","id":68003736,"number":2150,"title":"add `repeat` function","user":{"login":"zhy0216","id":903908,"avatar_url":"https://avatars.githubusercontent.com/u/903908?v=3","gravatar_id":"","url":"https://api.github.com/users/zhy0216","html_url":"https://github.com/zhy0216","followers_url":"https://api.github.com/users/zhy0216/followers","following_url":"https://api.github.com/users/zhy0216/following{/other_user}","gists_url":"https://api.github.com/users/zhy0216/gists{/gist_id}","starred_url":"https://api.github.com/users/zhy0216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhy0216/subscriptions","organizations_url":"https://api.github.com/users/zhy0216/orgs","repos_url":"https://api.github.com/users/zhy0216/repos","events_url":"https://api.github.com/users/zhy0216/events{/privacy}","received_events_url":"https://api.github.com/users/zhy0216/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-13T04:24:32Z","updated_at":"2015-04-13T04:24:32Z","closed_at":null,"body":"making a repeat function which will make the function run repeatedly.\r\nhere is my prototype implementation:\r\n\r\n```javascript\r\n_.repeat = function(func, wait){\r\n    var wait = wait || 1000;\r\n    function _wrapper(){\r\n        func();\r\n        _.delay(function(){\r\n            _wrapper();\r\n        }, wait);\r\n    }\r\n    _wrapper();\r\n}\r\n```"}}