Skip to content

elementUriToEntryUri

elementUriToEntryUri(registryEntryUri): EntryUri

Converts a registry entry URI to a simpler identifier URI.

Parameters

registryEntryUri: `entry:cord:${string}`

The registry entry URI to be converted. Format: ‘entry:cord::‘.

Returns

EntryUri

A simplified identifier URI: ‘entry:cord:’.

Remarks

This function processes a registry entry URI and returns a URI containing only the identifier part.

Example

const entryUri = 'entry:cord:1234:abcd';
const identifierUri = elementUriToEntryUri(entryUri);
console.log('Identifier URI:', identifierUri);

Throws

If the registryEntryUri does not conform to the expected format.

Description

The function splits the registryEntryUri, validates its structure, and constructs a URI using only the identifier part.

Source

identifier/src/Identifier.ts:939