```ts
/**
 * Extracts the tag name from an opening or closing HTML/XML tag.
 * @param marker - The tag marker, e.g., "<div>" or "</div>".
 * @returns The tag name without angle brackets or leading slash.
 */
export function tagOpen(marker: string): string {
  if (!marker.startsWith('<') || !marker.endsWith('>')) {
    throw new Error('Marker must be wrapped in angle brackets');
  }
  const tagName = marker.slice(1, -1).trim();
  return tagName.startsWith('/') ? tagName.slice(1) : tagName;
}

/**
 * Determines if an opening and closing tag name the same thing.
 * @param opening - The opening tag marker, e.g., "<div>".
 * @param closing - The closing tag marker, e.g., "</div>".
 * @returns true if they are the same tag, false otherwise.
 */
export function tagPair(opening: string, closing: string): boolean {
  const openTagName = tagOpen(opening);
  const closeTagName = tagOpen(closing);
  return openTagName === closeTagName;
}
```