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

Function transformData

lib/test/angular/1.8.0/angular.js:12178–12188  ·  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

12176 * @returns {*} Transformed data.
12177 */
12178function transformData(data, headers, status, fns) {
12179 if (isFunction(fns)) {
12180 return fns(data, headers, status);
12181 }
12182
12183 forEach(fns, function(fn) {
12184 data = fn(data, headers, status);
12185 });
12186
12187 return data;
12188}
12189
12190
12191function 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