MCPcopy Create free account
hub / github.com/apache/cloudstack / transformData

Function transformData

tools/ngui/static/js/lib/angular.js:8509–8518  ·  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

8507 * @returns {*} Transformed data.
8508 */
8509function transformData(data, headers, fns) {
8510 if (isFunction(fns))
8511 return fns(data, headers);
8512
8513 forEach(fns, function(fn) {
8514 data = fn(data, headers);
8515 });
8516
8517 return data;
8518}
8519
8520
8521function isSuccess(status) {

Callers 2

$httpFunction · 0.85
transformResponseFunction · 0.85

Calls 2

isFunctionFunction · 0.85
forEachFunction · 0.85

Tested by

no test coverage detected