MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / transformData

Function transformData

code/songhop/www/lib/angular/angular.js:8615–8624  ·  view source on GitHub ↗

* Chain all given functions * * This function is used for both request and response transforming * * @param {*} data Data to transform. * @param {function(string=)} headers Http headers getter fn. * @param {(Function|Array. )} fns Function or an array of functions. * @returns {*} Tra

(data, headers, fns)

Source from the content-addressed store, hash-verified

8613 * @returns {*} Transformed data.
8614 */
8615function transformData(data, headers, fns) {
8616 if (isFunction(fns))
8617 return fns(data, headers);
8618
8619 forEach(fns, function(fn) {
8620 data = fn(data, headers);
8621 });
8622
8623 return data;
8624}
8625
8626
8627function isSuccess(status) {

Callers 2

serverRequestFunction · 0.70
transformResponseFunction · 0.70

Calls 2

isFunctionFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected