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