-
Notifications
You must be signed in to change notification settings - Fork 0
/
composite.min.js
8 lines (8 loc) · 1.1 KB
/
composite.min.js
1
2
3
4
5
6
7
8
/**
* angular-hu-composite v1.1.0
* https://github.com/angular-hu/angular-hu
* (c) 2015 Telefónica I+D - http://www.tid.es
* @license MIT
*/
!function(e){"use strict";function r(r,t){return function(o,u){function c(e){return l(e)?n(r.when(e),p):e}function s(e){return l(e)?n(r.reject(e),p):r.reject(e)}function i(e){return e&&l(e.config)?n(r.when(e),h):e}function f(e){return e&&l(e.config)?n(r.reject(e),h):r.reject(e)}function a(){e.forEach(o,function(r){var n=e.isString(r)?t.get(r):t.invoke(r);(n.request||n.requestError)&&p.push({resolve:n.request,reject:n.requestError}),(n.response||n.responseError)&&h.unshift({resolve:n.response,reject:n.responseError})})}function l(r){return!j.flag&&!j.backend||r&&e.isDefined(r[j.flag])||r&&j.backend&&j.backend.test(r.url)}var p=[],h=[],j=e.extend({flag:null,backend:null},u),d={request:c,requestError:s,response:i,responseError:f};return a(),d}}function n(r,n){return e.forEach(n,function(e){r=r.then(e.resolve,e.reject)}),r}e.module("httpu.composite",[]).factory("huComposite",r),r.$inject=["$q","$injector"]}(window.angular);
//# sourceMappingURL=composite.min.js.map