Skip to content

The open alternative to Salesforce, designed for AI.

258 B
Raw Blame
const SHA256_FINGERPRINTED_URL_PATTERN = /\/([0-9a-f]{64})\.js$/;

export const extractComponentChecksumFromUrl = ({
  url,
}: {
  url: string;
}): string | undefined => {
  const match = url.match(SHA256_FINGERPRINTED_URL_PATTERN);

  return match?.[1];
};