MCPcopy
hub / github.com/axios/axios / transformData

Function transformData

lib/core/transformData.js:15–28  ·  view source on GitHub ↗
(fns, response)

Source from the content-addressed store, hash-verified

13 * @returns {*} The resulting transformed data
14 */
15export default function transformData(fns, response) {
16 const config = this || defaults;
17 const context = response || config;
18 const headers = AxiosHeaders.from(context.headers);
19 let data = context.data;
20
21 utils.forEach(fns, function transform(fn) {
22 data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
23 });
24
25 headers.normalize();
26
27 return data;
28}

Callers

nothing calls this directly

Calls 3

forEachMethod · 0.80
normalizeMethod · 0.80
fromMethod · 0.45

Tested by

no test coverage detected