furo-rel-exists

furo-rel-exists #

@furo/data v2.18.0
import '@furo/data/src/furo-rel-exists.js';
exports FuroRelExists js
exports <furo-rel-exists> custom-element-definition
superclass LitElement

summary checks for a specific rel

furo-rel-exists Checks if a hateoas relation exists in a given hateaos Links array.

1
<furo-rel-exists rel="update" service="person.Personservice" fn-inject="--HTS-array"></furo-rel-exists>

Attributes and Properties #

rel #

rel String

Name of the rel

service #

service String

define the service if you want a specific check on the service also

Events #

furo-rel-exists #

at-furo-rel-existsObject Hateoas Link

Fired when rel exists in linkArray.

rel-dont-exist #

at-rel-dont-existvoid

Fired when rel does not exists in linkArray.

Methods #

inject #

inject(linkArray [furo.Link] ) ⟹ boolean

[furo.Link] fn-inject

Inject a HTS Link Array to receive a rel-exist or a rel-dont-exist event.

inject returns true for existing links and false for non existing links. TODO: implement bind data too TODO: emit a event with bool which is triggered on any change of the hts array or binded data

  • linkArray Array of furo links