{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/6032","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/6032/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/6032/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/6032/events","html_url":"https://github.com/nodejs/node/pull/6032","id":145571237,"number":6032,"title":"events: add ability to prepend event listeners","user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/events","name":"events","color":"bfdadc"},{"url":"https://api.github.com/repos/nodejs/node/labels/semver-minor","name":"semver-minor","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":38,"created_at":"2016-04-04T03:04:02Z","updated_at":"2016-04-11T17:56:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/6032","html_url":"https://github.com/nodejs/node/pull/6032","diff_url":"https://github.com/nodejs/node/pull/6032.diff","patch_url":"https://github.com/nodejs/node/pull/6032.patch"},"body":"### Pull Request check-list\r\n\r\n- [ ] Does `make -j8 test` (UNIX) or `vcbuild test nosign` (Windows) pass with\r\n  this change (including linting)?\r\n- [ ] Is the commit message formatted according to [CONTRIBUTING.md][0]?\r\n- [ ] If this change fixes a bug (or a performance problem), is a regression\r\n  test (or a benchmark) included?\r\n- [ ] Is a documentation update included (if this change modifies\r\n  existing APIs, or introduces new ones)?\r\n\r\n_NOTE: these things are not required to open a PR and can be done\r\nafterwards / while the PR is open._\r\n\r\n### Affected core subsystem(s)\r\n\r\nevents\r\n\r\n### Description of change\r\n\r\nA handful of modules (including readable-streams) make inappropriate use of the internal _events property. One such use is to prepend an event listener to the front of the array of listeners.\r\n\r\nTo address part of the issue, this adds a new optional bitwise flag to the addListener/on/once methods that, when set, causes the listener to be prepended.\r\n\r\nDoc update and test case is included.\r\n\r\nFixes: https://github.com/nodejs/node/issues/1817\r\n\r\n/cc @ChALkeR "},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/208475352","html_url":"https://github.com/nodejs/node/pull/6032#issuecomment-208475352","issue_url":"https://api.github.com/repos/nodejs/node/issues/6032","id":208475352,"user":{"login":"calvinmetcalf","id":1128607,"avatar_url":"https://avatars.githubusercontent.com/u/1128607?v=3","gravatar_id":"","url":"https://api.github.com/users/calvinmetcalf","html_url":"https://github.com/calvinmetcalf","followers_url":"https://api.github.com/users/calvinmetcalf/followers","following_url":"https://api.github.com/users/calvinmetcalf/following{/other_user}","gists_url":"https://api.github.com/users/calvinmetcalf/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinmetcalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinmetcalf/subscriptions","organizations_url":"https://api.github.com/users/calvinmetcalf/orgs","repos_url":"https://api.github.com/users/calvinmetcalf/repos","events_url":"https://api.github.com/users/calvinmetcalf/events{/privacy}","received_events_url":"https://api.github.com/users/calvinmetcalf/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T17:56:14Z","updated_at":"2016-04-11T17:56:14Z","body":"we need to handle pipeing to a stream that doesn't have these 2 new methods"}}