✨feature: First push to git
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const invalidSheetCharacters = /[:/\\?*[\]]/g;
|
||||
|
||||
export function sanitizeSheetName(input: string): string {
|
||||
const cleaned = input.replace(invalidSheetCharacters, ' ').replace(/\s+/g, ' ').trim();
|
||||
return (cleaned || 'Newsletter').slice(0, 100);
|
||||
}
|
||||
|
||||
export function escapeCell(value: unknown): unknown {
|
||||
if (typeof value !== 'string') {
|
||||
return value;
|
||||
}
|
||||
return /^[=+\-@]/.test(value) ? `'${value}` : value;
|
||||
}
|
||||
|
||||
export interface CatalogPayload {
|
||||
rows: Record<string, unknown>[];
|
||||
sponsors: Record<string, unknown>[];
|
||||
deadLinks: Record<string, unknown>[];
|
||||
}
|
||||
|
||||
export interface OutputWriter {
|
||||
write(payload: CatalogPayload): Promise<unknown>;
|
||||
}
|
||||
Reference in New Issue
Block a user