function transformData(data, headers, fns) {
  if (isFunction(fns))
    return fns(data, headers);

  forEach(fns, function(fn) {
    data = fn(data, headers);
  });

  return data;
}
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.<function>)} fns Function or an array of functions.
@returns {*} Transformed data.