Skip to content

Instantly share code, notes, and snippets.

@ziad-saab
Created July 2, 2013 16:46
Show Gist options
  • Save ziad-saab/5910979 to your computer and use it in GitHub Desktop.
Save ziad-saab/5910979 to your computer and use it in GitHub Desktop.
Create a jQuery Promise from a Parse promise
Parse.Promise.prototype.toJqueryPromise = function() {
var def = jQuery.Deferred();
this.then(
def.resolve.bind(def),
def.reject.bind(def)
);
return def.promise();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment