This package allows you to instantiate uris of a string.
npm install template-uuid-instantiatorThis package allows you to instantiate uris of a string.
"https://example.org/--ref-algorithm-123-456-abc", we will explain each part below. It allows both " and ' - Base uri: In the example is the https://example.org/ part, this part will be preserved in the result uri
- Uuid: This part is the --ref-algorithm-123-456-abc in the example. it has itself 3 parts:
- --ref: This will be ignored in the result, it indicates you want this uri to be replaced
- algorithm: It will indicate which algorithm will be used to generate the uuid, look at the algorithms section to see which ones are supported
- 123-456-abc: This is an uuid that is used as memoization, combinations of the same base uri and uuid will generate the same uri. If they have different algorithms the first one that appears on the string will be used.
"https://example.org/--ref-uuid4-123-456-abc"js
import templateUuidInstantiator from '@lblod/template-uuid-instantiator'const document =
const instantiatedDocument = templateUuidInstantiator(document)
``