MCPcopy Index your code
hub / github.com/angular-ui/ui-router / transformData

Function transformData

test/angular/1.6/angular.js:11542–11552  ·  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 {number} status HTTP status code of the response. * @param {(Function|Array. )

(data, headers, status, fns)

Source from the content-addressed store, hash-verified

11540 * @returns {*} Transformed data.
11541 */
11542function transformData(data, headers, status, fns) {
11543 if (isFunction(fns)) {
11544 return fns(data, headers, status);
11545 }
11546
11547 forEach(fns, function(fn) {
11548 data = fn(data, headers, status);
11549 });
11550
11551 return data;
11552}
11553
11554
11555function isSuccess(status) {

Callers 2

serverRequestFunction · 0.70
transformResponseFunction · 0.70

Calls 3

fnFunction · 0.85
isFunctionFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected