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

Function transformData

test/angular/1.3/angular.js:8721–8730  ·  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

8719 * @returns {*} Transformed data.
8720 */
8721function transformData(data, headers, status, fns) {
8722 if (isFunction(fns))
8723 return fns(data, headers, status);
8724
8725 forEach(fns, function(fn) {
8726 data = fn(data, headers, status);
8727 });
8728
8729 return data;
8730}
8731
8732
8733function 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