1 /**
2 * Normalizes a CSV value by removing the leading "\r" from the
3 * value.
4 */
5 export function normalizeCSVValue<T>(value: T): T {
6 if (typeof value === "string") {
7 return value.replace(/\\r$/, "").trim() as T
8 }
9 return value
10 }