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

Function getReleaseVersionLabel

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

Source from the content-addressed store, hash-verified

575}
576
577function getReleaseVersionLabel(href: string) {
578 // Match releases with or without .html extension
579 let match = href.match(/releases\/(v[\w-]+)(?:\.html)?$/i);
580 if (!match) {
581 return null;
582 }
583 return match[1].replace(/-/g, '.');
584}
585
586interface ComponentCardProps extends Omit<CardProps, 'children'> {
587 name: string;

Callers 1

ComponentCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected