export function clearTag(htmlString: string | undefined) {
  return htmlString?.replace(/(<([^>]+)>)/gi, "");
}

export function limitString(anyString: string | undefined, limit: number = 50) {
  return anyString?.substring(0, limit)
}

export function makeExcerpt(htmlString: string | undefined, limit: number = 50) {
  return limitString(clearTag(htmlString ?? ''), limit);
}
