Skip to content

The open alternative to Salesforce, designed for AI.

306 B
Raw Blame
import { isNonEmptyString } from '@sniptt/guards';

type BuildAttributeCacheKeyInput = {
  name: string;
  namespace?: string | null;
};

export const buildAttributeCacheKey = ({
  name,
  namespace,
}: BuildAttributeCacheKeyInput): string =>
  isNonEmptyString(namespace) ? `${namespace}|${name}` : name;