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

Function transformData

lib/test/angular/1.6.7/angular.js:11471–11481  ·  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

11469 * @returns {*} Transformed data.
11470 */
11471function transformData(data, headers, status, fns) {
11472 if (isFunction(fns)) {
11473 return fns(data, headers, status);
11474 }
11475
11476 forEach(fns, function(fn) {
11477 data = fn(data, headers, status);
11478 });
11479
11480 return data;
11481}
11482
11483
11484function 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