MCPcopy
hub / github.com/binux/qiandao / transformData

Function transformData

web/static/components/angularjs/angular.js:7394–7403  ·  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 {(Function|Array. )} fns Function or an array of functions. * @returns {*} Tra

(data, headers, fns)

Source from the content-addressed store, hash-verified

7392 * @returns {*} Transformed data.
7393 */
7394function transformData(data, headers, fns) {
7395 if (isFunction(fns))
7396 return fns(data, headers);
7397
7398 forEach(fns, function(fn) {
7399 data = fn(data, headers);
7400 });
7401
7402 return data;
7403}
7404
7405
7406function isSuccess(status) {

Callers 2

serverRequestFunction · 0.85
transformResponseFunction · 0.85

Calls 2

forEachFunction · 0.85
isFunctionFunction · 0.70

Tested by

no test coverage detected