Capability first · transport second

RecordLinkIndex.js

Parses record links and builds their normalized index.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
On this page

Overview

Parses record links and builds their normalized index.

  • Artifact
    RecordLinkIndex.js · esm
  • Classification
    public first party
  • Availability
    Cross-host
  • Normalization
    Supported URLs and bare video IDs normalize to mutable locators; ordinary hosting is the default and privacy enhancement is opt-in.

Import and lifecycle

JavaScript
import * as module from '/arcane/modules/RecordLinkIndex.js';

Pure indexing with no mutation of supplied records.

Application-facing behavior: parseRecordLinks(), buildRecordLinkIndex().

Protocol and host implementation

In-process only This detail does not widen the application-facing API or grant authority.

Exports, signatures, parameters, and results

BindingFormDeclaration or signatureParameter syntax
buildRecordLinkIndexfunctionfunction buildRecordLinkIndex(records=[],{ id=item=>item.id, links=item=>item.links||[], validIds=null }={})records=[],{ id=item=>item.id, links=item=>item.links||[], validIds=null }={}
parseRecordLinksfunctionfunction parseRecordLinks(value='',{pattern=/\b[A-Z]\d{4}\b/gi}={})value='',{pattern=/\b[A-Z]\d{4}\b/gi}={}
CallableKindExact public signatureParameter syntax
parseRecordLinksexported-functionfunction parseRecordLinks(value='',{pattern=/\b[A-Z]\d{4}\b/gi}={})value='',{pattern=/\b[A-Z]\d{4}\b/gi}={}
buildRecordLinkIndexexported-functionfunction buildRecordLinkIndex(records=[],{ id=item=>item.id, links=item=>item.links||[], validIds=null }={})records=[],{ id=item=>item.id, links=item=>item.links||[], validIds=null }={}

Parameter meanings and results

parseRecordLinks(value,{pattern}) returns unique uppercase ids. buildRecordLinkIndex(records,{id?,links?,validIds?}) returns {outbound,inbound,invalid,linkCount}.

Events, side effects, and errors

Source-literal CustomEvent dispatches

No source-literal CustomEvent dispatch is part of this artifact.

Lifecycle and event flow

This artifact has no additional documented lifecycle event flow.

Direct coded failures

This artifact directly assigns no stable coded failure.

Exported Error subclasses

This artifact exports no Error subclass.

Documented failure behavior

  • Standard matchAll/callback errors can propagate, including a non-global RegExp.

Availability and capabilities

Cross-host. Supported URLs and bare video IDs normalize to mutable locators; ordinary hosting is the default and privacy enhancement is opt-in.

None.

Contract example

JavaScript
import {parseRecordLinks,buildRecordLinkIndex} from '/arcane/modules/RecordLinkIndex.js';

const records = [
    {id:'A1000',links:parseRecordLinks('See B2000')},
    {id:'B2000',links:[]}
];
console.log(buildRecordLinkIndex(records));

No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.