// 第三方依赖
import isObject from 'lodash/isObject';
/**
 * 解析请求参数
 */
export function parseRequestParams(params) {
    let clearDataType;
    if (isObject(params)) {
        if ('shouldClearData' in params && params.shouldClearData) {
            clearDataType = 'refresh';
        }
        else {
            clearDataType = 'load';
        }
    }
    else {
        clearDataType = params;
    }
    const paramsData = typeof params === 'object' ? params : {};
    return { clearDataType, paramsData };
}
