{"action":"closed","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2638","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2638/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2638/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2638/events","html_url":"https://github.com/pouchdb/pouchdb/issues/2638","id":40499385,"number":2638,"title":"sync uptodate event should include direction","user":{"login":"dholth","id":208018,"avatar_url":"https://avatars.githubusercontent.com/u/208018?v=3","gravatar_id":"","url":"https://api.github.com/users/dholth","html_url":"https://github.com/dholth","followers_url":"https://api.github.com/users/dholth/followers","following_url":"https://api.github.com/users/dholth/following{/other_user}","gists_url":"https://api.github.com/users/dholth/gists{/gist_id}","starred_url":"https://api.github.com/users/dholth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dholth/subscriptions","organizations_url":"https://api.github.com/users/dholth/orgs","repos_url":"https://api.github.com/users/dholth/repos","events_url":"https://api.github.com/users/dholth/events{/privacy}","received_events_url":"https://api.github.com/users/dholth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pouchdb/pouchdb/labels/documentation","name":"documentation","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-08-18T15:20:41Z","updated_at":"2015-08-02T14:34:48Z","closed_at":"2015-08-02T14:34:48Z","body":"When calling sync() all the callbacks get a ({direction, change}) argument except the uptodate callback which just receives the change.\r\n\r\nThe consequence is that a sync() will get two uptodate events but it's not obvious which direction is up to date.\r\n\r\nAs an aside I found it confusing that the to/from callbacks have a different signature than the sync() callbacks, the former being called just with a change, the latter including the direction."}}