dist/gi-util.js
function transformData(data, headers, status, fns) {
  if (isFunction(fns))
    return fns(data, headers, status);

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

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

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

  return data;
}
function transformData ( data , headers , status , fns ) { if ( isFunction ( fns ) ) return fns ( data , headers , status ) ; forEach ( fns , function ( fn ) { data = fn ( data , headers , status ) ; } ) ; 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 {number} status HTTP status code of the response.
@param {(Function|Array.<Function>)} fns Function or an array of functions.
@returns {*} Transformed data.
Chain all given functions