{"action":"created","issue":{"url":"https://api.github.com/repos/flightjs/flight/issues/299","labels_url":"https://api.github.com/repos/flightjs/flight/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/flightjs/flight/issues/299/comments","events_url":"https://api.github.com/repos/flightjs/flight/issues/299/events","html_url":"https://github.com/flightjs/flight/pull/299","id":39859098,"number":299,"title":"Add support for multi-function advice","user":{"login":"prashaantt","id":390540,"avatar_url":"https://avatars.githubusercontent.com/u/390540?v=3","gravatar_id":"","url":"https://api.github.com/users/prashaantt","html_url":"https://github.com/prashaantt","followers_url":"https://api.github.com/users/prashaantt/followers","following_url":"https://api.github.com/users/prashaantt/following{/other_user}","gists_url":"https://api.github.com/users/prashaantt/gists{/gist_id}","starred_url":"https://api.github.com/users/prashaantt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashaantt/subscriptions","organizations_url":"https://api.github.com/users/prashaantt/orgs","repos_url":"https://api.github.com/users/prashaantt/repos","events_url":"https://api.github.com/users/prashaantt/events{/privacy}","received_events_url":"https://api.github.com/users/prashaantt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-08-08T20:18:34Z","updated_at":"2015-01-15T09:31:28Z","closed_at":"2015-01-13T15:46:04Z","pull_request":{"url":"https://api.github.com/repos/flightjs/flight/pulls/299","html_url":"https://github.com/flightjs/flight/pull/299","diff_url":"https://github.com/flightjs/flight/pull/299.diff","patch_url":"https://github.com/flightjs/flight/pull/299.patch"},"body":"I just ran into this problem and realised the Advice API could be improved to intuitively allow specifying multiple methods at once. With my commit I can now write\r\n\r\n```javascript\r\nthis.around('read write', function (func, key, value) {\r\n  if (this.supportsLocalStorage) {\r\n    return func(key, value);\r\n  } \r\n\r\n  return false;\r\n});\r\n```\r\n\r\nso that I'll have to make this check only once for both `read` and `write`.\r\n\r\nThe existing tests pass for me with this commit. If you find it useful I can go on to write another test for this use case."},"comment":{"url":"https://api.github.com/repos/flightjs/flight/issues/comments/70060188","html_url":"https://github.com/flightjs/flight/pull/299#issuecomment-70060188","issue_url":"https://api.github.com/repos/flightjs/flight/issues/299","id":70060188,"user":{"login":"prashaantt","id":390540,"avatar_url":"https://avatars.githubusercontent.com/u/390540?v=3","gravatar_id":"","url":"https://api.github.com/users/prashaantt","html_url":"https://github.com/prashaantt","followers_url":"https://api.github.com/users/prashaantt/followers","following_url":"https://api.github.com/users/prashaantt/following{/other_user}","gists_url":"https://api.github.com/users/prashaantt/gists{/gist_id}","starred_url":"https://api.github.com/users/prashaantt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashaantt/subscriptions","organizations_url":"https://api.github.com/users/prashaantt/orgs","repos_url":"https://api.github.com/users/prashaantt/repos","events_url":"https://api.github.com/users/prashaantt/events{/privacy}","received_events_url":"https://api.github.com/users/prashaantt/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T09:31:28Z","updated_at":"2015-01-15T09:31:28Z","body":"Sure, I'll give it a stab."}}