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

Function transformData

lib/test/angular/1.5.0/angular.js:10218–10228  ·  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

10216 * @returns {*} Transformed data.
10217 */
10218function transformData(data, headers, status, fns) {
10219 if (isFunction(fns)) {
10220 return fns(data, headers, status);
10221 }
10222
10223 forEach(fns, function(fn) {
10224 data = fn(data, headers, status);
10225 });
10226
10227 return data;
10228}
10229
10230
10231function isSuccess(status) {

Callers 2

serverRequestFunction · 0.70
transformResponseFunction · 0.70

Calls 3

isFunctionFunction · 0.70
forEachFunction · 0.70
fnFunction · 0.50

Tested by

no test coverage detected