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

Function transformData

test/angular/1.2/angular.js:7494–7503  ·  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

7492 * @returns {*} Transformed data.
7493 */
7494function transformData(data, headers, fns) {
7495 if (isFunction(fns))
7496 return fns(data, headers);
7497
7498 forEach(fns, function(fn) {
7499 data = fn(data, headers);
7500 });
7501
7502 return data;
7503}
7504
7505
7506function 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