{"action":"created","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/2343","repository_url":"https://api.github.com/repos/lodash/lodash","labels_url":"https://api.github.com/repos/lodash/lodash/issues/2343/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/2343/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/2343/events","html_url":"https://github.com/lodash/lodash/issues/2343","id":155020346,"number":2343,"title":"`batched` option for `_.throttle`","user":{"login":"pillowfication","id":7277535,"avatar_url":"https://avatars.githubusercontent.com/u/7277535?v=3","gravatar_id":"","url":"https://api.github.com/users/pillowfication","html_url":"https://github.com/pillowfication","followers_url":"https://api.github.com/users/pillowfication/followers","following_url":"https://api.github.com/users/pillowfication/following{/other_user}","gists_url":"https://api.github.com/users/pillowfication/gists{/gist_id}","starred_url":"https://api.github.com/users/pillowfication/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pillowfication/subscriptions","organizations_url":"https://api.github.com/users/pillowfication/orgs","repos_url":"https://api.github.com/users/pillowfication/repos","events_url":"https://api.github.com/users/pillowfication/events{/privacy}","received_events_url":"https://api.github.com/users/pillowfication/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/change","name":"change","color":"eb6420"},{"url":"https://api.github.com/repos/lodash/lodash/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-16T12:33:45Z","updated_at":"2016-05-16T14:33:30Z","closed_at":"2016-05-16T14:33:30Z","body":"and `_.debounce`.\r\n\r\nCurrently a throttled function will be invoked with the last arguments provided. I'm looking for a way to batch all the arguments provided (while the function is being throttled), and then invoking the function with those batched arguments. Normally the arguments are objects and `_.assign` is used to batch them.\r\n\r\nExample:\r\n```javascript\r\nvar func = _.throttle(\r\n  function update(values) { ... },\r\n  100,\r\n  {batched: true}\r\n);\r\n\r\nfunc({a: 'foo', b: 'hello'});\r\nfunc({a: 'bar'});\r\nfunc({c: 'world'});\r\n\r\n// `update` is invoked with ({a: 'bar', b: 'hello', c: 'world'})\r\n```"},"comment":{"url":"https://api.github.com/repos/lodash/lodash/issues/comments/219440530","html_url":"https://github.com/lodash/lodash/issues/2343#issuecomment-219440530","issue_url":"https://api.github.com/repos/lodash/lodash/issues/2343","id":219440530,"user":{"login":"jdalton","id":4303,"avatar_url":"https://avatars.githubusercontent.com/u/4303?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T14:33:30Z","updated_at":"2016-05-16T14:33:30Z","body":"Hi @pillowfication!\r\n\r\nThis looks a bit too specialized for core. You might be able to manage this by wrapping your debounced function."}}