MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getReleaseVersionLabel

Function getReleaseVersionLabel

packages/dev/s2-docs/src/ComponentCard.tsx:528–535  ·  view source on GitHub ↗
(href: string)

Source from the content-addressed store, hash-verified

526}
527
528function getReleaseVersionLabel(href: string) {
529 // Match releases with or without .html extension
530 let match = href.match(/releases\/(v[\w-]+)(?:\.html)?$/i);
531 if (!match) {
532 return null;
533 }
534 return match[1].replace(/-/g, '.');
535}
536
537interface ComponentCardProps extends Omit<CardProps, 'children'> {
538 name: string;

Callers 1

ComponentCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected