π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix(nc-gui): trim matching quotes from quey params
Ramesh Manef15a955442fd
diff --git a/packages/nocodb-sdk/src/lib/stringHelpers.ts b/packages/nocodb-sdk/src/lib/stringHelpers.tsindex 35ddde8e88..9d3b68c4f2 100644--- a/packages/nocodb-sdk/src/lib/stringHelpers.ts+++ b/packages/nocodb-sdk/src/lib/stringHelpers.ts@@ -151,3 +151,14 @@ export function generateUniqueCopyName<T = string>(export function escapeRegexString(string: string) {return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');}++/**+ * Trim matching quotes from the string+ * @param str - The string to trim+ * @returns The trimmed string+ */+export const trimMatchingQuotes = (str?: string | null): string => {+ if (!str?.trim()) return '';++ return str?.trim()?.replace(/^(['"])(.*)\1$/, '$2') ?? '';+};