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
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
| Binding | Form | Declaration or signature | Parameter syntax |
|---|---|---|---|
buildRecordLinkIndex | function | function buildRecordLinkIndex(records=[],{
id=item=>item.id,
links=item=>item.links||[],
validIds=null
}={}) | records=[],{
id=item=>item.id,
links=item=>item.links||[],
validIds=null
}={} |
parseRecordLinks | function | function parseRecordLinks(value='',{pattern=/\b[A-Z]\d{4}\b/gi}={}) | value='',{pattern=/\b[A-Z]\d{4}\b/gi}={} |
| Callable | Kind | Exact public signature | Parameter syntax |
|---|---|---|---|
parseRecordLinks | exported-function | function parseRecordLinks(value='',{pattern=/\b[A-Z]\d{4}\b/gi}={}) | value='',{pattern=/\b[A-Z]\d{4}\b/gi}={} |
buildRecordLinkIndex | exported-function | function 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
import {parseRecordLinks,buildRecordLinkIndex} from '/arcane/modules/RecordLinkIndex.js';
const records = [
{id:'A1000',links:parseRecordLinks('See B2000')},
{id:'B2000',links:[]}
];
console.log(buildRecordLinkIndex(records));
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.