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

Function transformData

lib/test/angular/1.7.0/angular.js:11544–11554  ·  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

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

Callers 2

serverRequestFunction · 0.70
transformResponseFunction · 0.70

Calls 3

isFunctionFunction · 0.70
forEachFunction · 0.70
fnFunction · 0.70

Tested by

no test coverage detected