Record type defining available link relations
Adds one or more links to the container.
Multiple links with the same rel are stored as an array.
Link objects to add
Adds a link with rel and href strings.
The link relation type
The link target URI
Deletes links by relation and optionally by href.
The relation type to delete
Optionalhref: stringOptional href to match; deletes all if not provided
Returns the first link matching a relation.
The relation type to find
The first matching Link or undefined
Checks if any links exist with the given relation.
The relation type to check
true if at least one link exists with the rel
Sets a link, replacing any existing links with the same rel.
The link object to set
Sets a link using rel and href strings.
The link relation type
The link target URI
Container for managing a collection of hypermedia links.
Provides methods for adding, retrieving, and querying links by their relation type. Supports multiple links per relation.
Example