{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4892","repository_url":"https://api.github.com/repos/pouchdb/pouchdb","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4892/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4892/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4892/events","html_url":"https://github.com/pouchdb/pouchdb/pull/4892","id":133595261,"number":4892,"title":"(#4891) - add async/await examples to the docs","user":{"login":"nolanlawson","id":283842,"avatar_url":"https://avatars.githubusercontent.com/u/283842?v=3","gravatar_id":"","url":"https://api.github.com/users/nolanlawson","html_url":"https://github.com/nolanlawson","followers_url":"https://api.github.com/users/nolanlawson/followers","following_url":"https://api.github.com/users/nolanlawson/following{/other_user}","gists_url":"https://api.github.com/users/nolanlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nolanlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolanlawson/subscriptions","organizations_url":"https://api.github.com/users/nolanlawson/orgs","repos_url":"https://api.github.com/users/nolanlawson/repos","events_url":"https://api.github.com/users/nolanlawson/events{/privacy}","received_events_url":"https://api.github.com/users/nolanlawson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-15T00:03:46Z","updated_at":"2016-02-16T03:23:37Z","closed_at":"2016-02-16T03:23:37Z","pull_request":{"url":"https://api.github.com/repos/pouchdb/pouchdb/pulls/4892","html_url":"https://github.com/pouchdb/pouchdb/pull/4892","diff_url":"https://github.com/pouchdb/pouchdb/pull/4892.diff","patch_url":"https://github.com/pouchdb/pouchdb/pull/4892.patch"},"body":"I'm very careful to note that this is an experimental ES7 API. However, I think we can do a great service to the JS community by providing a [Rosetta stone](https://en.wikipedia.org/wiki/Rosetta_Stone) to show the difference between callbacks/promises/async functions.\r\n\r\nAlso, I find myself starting to use ES7 async/await more and more, especially when I use PouchDB. Frankly I don't really find any feature of ES6 very exciting (except maybe arrow functions), but async/await vastly improves my productivity, because I can't seem to write promise-based code without messing it up. :stuck_out_tongue: \r\n\r\nNote that promises are still the default in the documentation.\r\n\r\n![screenshot 2016-02-14 15 59 10](https://cloud.githubusercontent.com/assets/283842/13037390/931a789a-d334-11e5-9b46-608046c8932c.png)\r\n![screenshot 2016-02-14 15 59 18](https://cloud.githubusercontent.com/assets/283842/13037391/931c8798-d334-11e5-9e62-c5e8f889bb62.png)\r\n"},"comment":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/comments/184497172","html_url":"https://github.com/pouchdb/pouchdb/pull/4892#issuecomment-184497172","issue_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4892","id":184497172,"user":{"login":"nolanlawson","id":283842,"avatar_url":"https://avatars.githubusercontent.com/u/283842?v=3","gravatar_id":"","url":"https://api.github.com/users/nolanlawson","html_url":"https://github.com/nolanlawson","followers_url":"https://api.github.com/users/nolanlawson/followers","following_url":"https://api.github.com/users/nolanlawson/following{/other_user}","gists_url":"https://api.github.com/users/nolanlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nolanlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolanlawson/subscriptions","organizations_url":"https://api.github.com/users/nolanlawson/orgs","repos_url":"https://api.github.com/users/nolanlawson/repos","events_url":"https://api.github.com/users/nolanlawson/events{/privacy}","received_events_url":"https://api.github.com/users/nolanlawson/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T03:23:37Z","updated_at":"2016-02-16T03:23:37Z","body":"3acb34dad1fd24206a6e3dbe318ff355f91e6e8f\r\n"}}