On this page
Overview
Indexes text lines, page markers, dates, rules, and excerpts for record review.
- Artifact
RecordPassageIndex.js· esm - Classification
public first party - Availability
Cross-host - Normalization
Complete selected excerpts and every unique date/rule finding are preserved without character or result-count caps.
Import and lifecycle
import * as module from '/arcane/modules/RecordPassageIndex.js';
Pure complete text/page/date/rule analysis. Supplied accept callbacks run synchronously; inputs are not mutated.
Application-facing behavior: Eight text/page/date/rule helper exports.
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 |
|---|---|---|---|
cleanExcerpt | function | function cleanExcerpt(lines=[],start=0,end=start) | lines=[],start=0,end=start |
extractDateMentions | function | function extractDateMentions(text='',{
recordId='',
contextLines=1
}={}) | text='',{
recordId='',
contextLines=1
}={} |
findRulePassages | function | function findRulePassages(text='',rules=[],{
recordId='',
contextLines=2
}={}) | text='',rules=[],{
recordId='',
contextLines=2
}={} |
pageAtLine | function | function pageAtLine(markers=[],line=0) | markers=[],line=0 |
pageMarkers | function | function pageMarkers(lines=[]) | lines=[] |
parseDateMention | function | function parseDateMention(value='') | value='' |
textLines | function | function textLines(value='') | value='' |
validIsoDate | function | function validIsoDate(year,month=1,day=1) | year,month=1,day=1 |
Parameter meanings and results
textLines(text); cleanExcerpt(lines,start,end) preserves the complete selected excerpt; pageMarkers(lines); pageAtLine(markers,line); validIsoDate(y,m,d); parseDateMention(text); extractDateMentions(text,options) returns all sorted findings; findRulePassages(text,rules,options) returns all unique findings.
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
- Invalid caller RegExp/pattern or accept callback errors propagate.
Availability and capabilities
Cross-host. Complete selected excerpts and every unique date/rule finding are preserved without character or result-count caps.
None.
Contract example
import {findRulePassages} from '/arcane/modules/RecordPassageIndex.js';
const findings = findRulePassages(
'# PDF Page 2\nPayment due Friday.',
[{id:'payment',label:'Payment',patterns:[/payment due/gi]}],
{recordId:'A1000'}
);
console.log(findings[0]);
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.