mock-angular.js
function applyTransform(data, headers, status, fns) {
		if (typeof fns === 'function') {
			data = fns(data, headers, status);
		} else {
			for (var i = 0; i < fns.length; i++) {
				data = fns[i](data, headers, status);
			}
		}
		return data;
	}
function applyTransform(data, headers, status, fns) {
		if (typeof fns === 'function') {
			data = fns(data, headers, status);
		} else {
			for (var i = 0; i < fns.length; i++) {
				data = fns[i](data, headers, status);
			}
		}
		return data;
	}
function applyTransform ( data , headers , status , fns ) { if ( typeof fns === 'function' ) { data = fns ( data , headers , status ) ; } else { for ( var i = 0 ; i < fns . length ; i ++ ) { data = fns [ i ] ( data , headers , status ) ; } } return data ; }
Apply request or response transform
@param data
@param headers
@param status
@param fns
@returns {*}
Apply request or response transform