{"action":"created","issue":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/305","labels_url":"https://api.github.com/repos/paulmillr/chokidar/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/paulmillr/chokidar/issues/305/comments","events_url":"https://api.github.com/repos/paulmillr/chokidar/issues/305/events","html_url":"https://github.com/paulmillr/chokidar/issues/305","id":90727451,"number":305,"title":"listen to multiple events","user":{"login":"Nirazul","id":781476,"avatar_url":"https://avatars.githubusercontent.com/u/781476?v=3","gravatar_id":"","url":"https://api.github.com/users/Nirazul","html_url":"https://github.com/Nirazul","followers_url":"https://api.github.com/users/Nirazul/followers","following_url":"https://api.github.com/users/Nirazul/following{/other_user}","gists_url":"https://api.github.com/users/Nirazul/gists{/gist_id}","starred_url":"https://api.github.com/users/Nirazul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nirazul/subscriptions","organizations_url":"https://api.github.com/users/Nirazul/orgs","repos_url":"https://api.github.com/users/Nirazul/repos","events_url":"https://api.github.com/users/Nirazul/events{/privacy}","received_events_url":"https://api.github.com/users/Nirazul/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-24T16:34:56Z","updated_at":"2015-06-24T16:47:45Z","closed_at":"2015-06-24T16:47:45Z","body":"This is a feature request, not an issue (I haven't found any hint in the docu that this is possible):\r\nIt'd be great to have some sort of multi event listener to keep my files DRY (like jQuery):\r\n\r\n**now**\r\n```\r\n        $$imageWatcher\r\n            .on(\"add\", optimizeDirty })\r\n            .on(\"change\", optimizeDirty })\r\n            .on(\"unlink\", optimizeClean });\r\n```\r\n\r\n**proposal**\r\n```\r\n        $$imageWatcher\r\n            .on(\"add change\", optimizeDirty })\r\n            .on(\"unlink\", optimizeClean });\r\n```"},"comment":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/comments/114939039","html_url":"https://github.com/paulmillr/chokidar/issues/305#issuecomment-114939039","issue_url":"https://api.github.com/repos/paulmillr/chokidar/issues/305","id":114939039,"user":{"login":"es128","id":1740641,"avatar_url":"https://avatars.githubusercontent.com/u/1740641?v=3","gravatar_id":"","url":"https://api.github.com/users/es128","html_url":"https://github.com/es128","followers_url":"https://api.github.com/users/es128/followers","following_url":"https://api.github.com/users/es128/following{/other_user}","gists_url":"https://api.github.com/users/es128/gists{/gist_id}","starred_url":"https://api.github.com/users/es128/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/es128/subscriptions","organizations_url":"https://api.github.com/users/es128/orgs","repos_url":"https://api.github.com/users/es128/repos","events_url":"https://api.github.com/users/es128/events{/privacy}","received_events_url":"https://api.github.com/users/es128/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T16:47:45Z","updated_at":"2015-06-24T16:47:45Z","body":"Thanks @TrySound I was just typing approximately the same thing. Perhaps there is (or someone could write) a wrapper library out there that could convert your `.on(\"add change\", optimizeDirty })` preference into the proper event listeners.\r\n\r\nChokidar is the wrong place to do this kind of overloading on node's EventEmitter."}}