Skip to content
HomePagesHomePages template kit

acceptsLink

Does `url` satisfy an `accepts` token — a `LinkKind` or a single `LinkProviderId`?

Does url satisfy an accepts token — a LinkKind or a single LinkProviderId?

Import from @homepages/template-kit.

function acceptsLink(accepts: string, url: string): boolean
Name Type Required Description
accepts string required A url slot’s accepts value. An unrecognized token
always yields false: a typo must fail closed, never accept everything.
url string required

boolean

  • Callers handle the empty-value case themselves — an empty url slot is legal regardless of accepts (clearing a slot is not a validity question).