{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/promises/issues/6","repository_url":"https://api.github.com/repos/nodejs/promises","labels_url":"https://api.github.com/repos/nodejs/promises/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/promises/issues/6/comments","events_url":"https://api.github.com/repos/nodejs/promises/issues/6/events","html_url":"https://github.com/nodejs/promises/issues/6","id":133776875,"number":6,"title":"`util.toCallback(asyncFn)` - interop of async functions with callbacks.","user":{"login":"benjamingr","id":1315533,"avatar_url":"https://avatars.githubusercontent.com/u/1315533?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingr","html_url":"https://github.com/benjamingr","followers_url":"https://api.github.com/users/benjamingr/followers","following_url":"https://api.github.com/users/benjamingr/following{/other_user}","gists_url":"https://api.github.com/users/benjamingr/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingr/subscriptions","organizations_url":"https://api.github.com/users/benjamingr/orgs","repos_url":"https://api.github.com/users/benjamingr/repos","events_url":"https://api.github.com/users/benjamingr/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-15T17:45:20Z","updated_at":"2016-02-15T19:20:18Z","closed_at":null,"body":"Similar to https://github.com/nodejs/promises/issues/5 I'm looking at ways to make the lives of callback users easier with `async/await` landing. I'm wondering if core should provide a method called `toCallback` that takes an async function and converts it to a callback returning function. This is similar to [`asCallback`](http://bluebirdjs.com/docs/api/ascallback.html) except taking a function: \r\n\r\n```js\r\nasync function fooP() {\r\n    // some async/await stuff\r\n    // ...\r\n    return \"Hello\"; \r\n}\r\nconst foo = util.toCallback(fooP);\r\n\r\nfoo((err, data) => console.log(data)); // hello\r\n```\r\n\r\n\r\nThe name and where it is are both debatable. "},"comment":{"url":"https://api.github.com/repos/nodejs/promises/issues/comments/184352337","html_url":"https://github.com/nodejs/promises/issues/6#issuecomment-184352337","issue_url":"https://api.github.com/repos/nodejs/promises/issues/6","id":184352337,"user":{"login":"chrisdickinson","id":37303,"avatar_url":"https://avatars.githubusercontent.com/u/37303?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdickinson","html_url":"https://github.com/chrisdickinson","followers_url":"https://api.github.com/users/chrisdickinson/followers","following_url":"https://api.github.com/users/chrisdickinson/following{/other_user}","gists_url":"https://api.github.com/users/chrisdickinson/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdickinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdickinson/subscriptions","organizations_url":"https://api.github.com/users/chrisdickinson/orgs","repos_url":"https://api.github.com/users/chrisdickinson/repos","events_url":"https://api.github.com/users/chrisdickinson/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdickinson/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T19:20:18Z","updated_at":"2016-02-15T19:20:18Z","body":"Does anyone object to making this issue non-blocking for the Promises PR?"}}