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

Function transformData

lib/test/angular/1.4.3/angular.js:9333–9343  ·  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

9331 * @returns {*} Transformed data.
9332 */
9333function transformData(data, headers, status, fns) {
9334 if (isFunction(fns)) {
9335 return fns(data, headers, status);
9336 }
9337
9338 forEach(fns, function(fn) {
9339 data = fn(data, headers, status);
9340 });
9341
9342 return data;
9343}
9344
9345
9346function 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