export function paramMate(data) {
  if (typeof data != "object" && data == null) {
    return data;
  }
  data = JSON.parse(JSON.stringify(data));
  if (Array.isArray(data)) {
    data = data.map((e) => {
      if (isTimeStamp(e)) {
        e = parseInt(e / 1000);
      }
      return e;
    });
  } else {
    for (const key in data) {
      if (typeof data[key] == "object") {
        data[key] = paramMate(data[key]);
      } else {
        if (isTimeStamp(data[key])) {
          data[key] = parseInt(data[key] / 1000);
        }
      }
    }
  }
  return data;
}
export function isTimeStamp(time) {
  return typeof time == "number" && String(time).length == 13;
}
