UNPKG

@ace-fetch/uni-app

Version:

uni-app adapter for @ace-fetch/core.

14 lines (13 loc) 413 B
import { forEach } from '../utils'; /** * Transform the data for a request or a response */ export function transformData(fns, response) { var config = this; var context = response || config; var data = context.data; forEach(fns || [], function transform(fn) { data = fn.call(config, data, response === null || response === void 0 ? void 0 : response.status); }); return data; }