diff --git a/README.md b/README.md index c309dc1..f664d81 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +### Backbone-sync-deferred + Ultra lightweight & seamless Backbone.sync override to work with promises. Just include the script after backbone. And you'll be able to do : diff --git a/backbone-sync-deferred.min.js b/backbone-sync-deferred.min.js index 9edff76..c642c50 100644 --- a/backbone-sync-deferred.min.js +++ b/backbone-sync-deferred.min.js @@ -1 +1 @@ -"use strict";!function(a,b,c){module!==c?module.exports=b(require("backbone"),require("jquery")):a.Backbone.sync=b(a.Backbone,a.$)}(this,function(a,b){var c=a.sync,d=function(a,d,e){var f=e.success,g=e.error,h=b.Deferred();return e.success=function(a,b,c){return f&&f(a,b,c),h.resolve(a)},e.error=function(a,b,c){return g&&g(a,b,c),h.reject(b.responseText)},c(a,d,e),h.promise};return d}); \ No newline at end of file +"use strict";!function(a,b,c){module!==c?module.exports=b(require("backbone"),require("jquery")):a.Backbone.sync=b(a.Backbone,a.$)}(this,function(a,b){var c=a.sync,d=function(a,d,e){var f=e.success,g=e.error,h=b.Deferred();return e.success=function(a,b,c){return f&&f(a,b,c),h.resolve(a)},e.error=function(a,b,c){return g&&g(a,b,c),h.reject(b)},c(a,d,e),h.promise};return d}); \ No newline at end of file