driftyco/ng-cordova — pull request #416 by matiassingers (2014-11-03 05:53:41+00:00)
Title: Simplify promisification in facebook.js

No need for the anonymous functions, just invoke the `q.reject`/`q.resolve` directly as the callback params.

Wanted to send this PR before I started doing it on the other plugins as well.

----

I just noticed this is actually the case for quite a lot of the plugins, what do you guys think about a little wrapper/decorator to `$q` which promisifies a callback-function.
See [Bluebird promisification](https://github.com/petkaantonov/bluebird/blob/master/API.md#promisification) for an example.