PHP 8.2.30
Preview: transformData.js Size: 776 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/axios/lib/core/transformData.js

'use strict';

import utils from '../utils.js';
import defaults from '../defaults/index.js';
import AxiosHeaders from '../core/AxiosHeaders.js';

/**
 * Transform the data for a request or a response
 *
 * @param {Array|Function} fns A single function or Array of functions
 * @param {?Object} response The response object
 *
 * @returns {*} The resulting transformed data
 */
export default function transformData(fns, response) {
  const config = this || defaults;
  const context = response || config;
  const headers = AxiosHeaders.from(context.headers);
  let data = context.data;

  utils.forEach(fns, function transform(fn) {
    data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
  });

  headers.normalize();

  return data;
}

Directory Contents

Dirs: 0 × Files: 10

Name Size Perms Modified Actions
7.15 KB lrw-r--r-- 2026-02-20 03:53:00
Edit Download
2.45 KB lrw-r--r-- 2026-02-20 03:53:04
Edit Download
7.22 KB lrw-r--r-- 2026-02-20 03:53:04
Edit Download
783 B lrw-r--r-- 2026-02-20 03:53:06
Edit Download
2.14 KB lrw-r--r-- 2026-02-20 03:53:06
Edit Download
1.56 KB lrw-r--r-- 2026-02-20 03:53:06
Edit Download
3.49 KB lrw-r--r-- 2026-02-20 03:53:08
Edit Download
399 B lrw-r--r-- 2026-02-20 03:53:18
Edit Download
836 B lrw-r--r-- 2026-02-20 03:53:08
Edit Download
776 B lrw-r--r-- 2026-02-20 03:53:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).