Sha256: a203f106b1fff9fdb9a792c8fdd0c8f9272c286d00cf82811e6803eb8bc4e44c

Contents?: true

Size: 550 Bytes

Versions: 26

Compression:

Stored size: 550 Bytes

Contents

'use strict';

var utils = require('./../utils');

/**
 * Transform the data for a request or a response
 *
 * @param {Object|String} data The data to be transformed
 * @param {Array} headers The headers for the request or response
 * @param {Array|Function} fns A single function or Array of functions
 * @returns {*} The resulting transformed data
 */
module.exports = function transformData(data, headers, fns) {
  /*eslint no-param-reassign:0*/
  utils.forEach(fns, function transform(fn) {
    data = fn(data, headers);
  });

  return data;
};

Version data entries

26 entries across 14 versions & 4 rubygems

Version Path
waves_lib-0.1.0 js/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.4 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.4 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.3 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.3 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.2 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.2 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.1 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.1 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.0 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.1.0 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.9 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.9 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.8 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.8 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.7 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.7 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.6 lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js
authing_ruby-1.0.6 lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js
ilog-0.4.1 node_modules/axios/lib/core/transformData.js