```ts
/**
 * Determines if the given character is the 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 a comma standing 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 inQuoteMode = false;
  let currentPart = '';

  for (const ch of line) {
    if (!inQuoteMode && ch === ',') {
      result.push(currentPart);
      currentPart = '';
    } else if (!inQuoteMode && ch === '"' || ch === "'") {
      inQuoteMode = true;
      currentPart += ch;
    } else if (inQuoteMode) {
      currentPart += ch;
    } else {
      currentPart += ch;
    }
  }

  result.push(currentPart);

  return result.filter(part => part.length > 0);
}
```