```ts
/**
 * Determines if a character is a quotation mark.
 * @param ch - The character to check.
 * @returns true if the character is a quotation mark, false otherwise.
 */
export function inQuote(ch: string): boolean {
  return ch === '"' || ch === "'";
}

/**
 * Splits a line on commas, except for commas inside quotation marks.
 * @param line - The line to split.
 * @returns An array of pieces with their quotation marks still in place.
 */
export function quoteSplit(line: string): string[] {
  const result: string[] = [];
  let currentPiece = '';
  let inQuotes = false;

  for (const ch of line) {
    if (inQuote(ch)) {
      inQuotes = !inQuotes;
      currentPiece += ch;
    } else if (ch === ',' && !inQuotes) {
      result.push(currentPiece);
      currentPiece = '';
    } else {
      currentPiece += ch;
    }
  }

  if (currentPiece !== '') {
    result.push(currentPiece);
  }

  return result;
}
```