export function isObject(data: any) {
  const typeofs = Object.prototype.toString.call(data);
  if (typeofs === '[object Object]') {
    return true;
  } else {
    return false;
  }
}

export function isArray(data: any) {
  const typeofs = Object.prototype.toString.call(data);
  if (typeofs === '[object Array]') {
    return true;
  } else {
    return false;
  }
}

export function isLastArr(index: any, data: any) {
  const len = data.length;
  if (index === len - 1) {
    return true;
  } else {
    return false;
  }
}

export function isLastObj(index: any, data: any) {
  const len = Object.keys(data).length;
  if (index === len - 1) {
    return true;
  } else {
    return false;
  }
}