The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import { isNonEmptyString } from '@sniptt/guards';
const COPY_SUFFIX = '(Copy)';
const COPY_SUFFIX_LOWERCASE = '(copy)';
export const appendCopySuffix = (value: string): string => {
if (!isNonEmptyString(value)) {
return value;
}
if (value.toLowerCase().endsWith(COPY_SUFFIX_LOWERCASE)) {
return value;
}
return `${value} ${COPY_SUFFIX}`;
};