On this page
Overview
Matches configured risk signals and levels against complete text.
- Artifact
RiskSignalAnalyzer.js· esm - Classification
public first party - Availability
Cross-host - Normalization
Fully normalized.
Import and lifecycle
import * as module from '/arcane/modules/RiskSignalAnalyzer.js';
Pure NFKC scan of the complete supplied text; resets each supplied RegExp lastIndex before testing and does not mutate the input.
Application-facing behavior: DEFAULTLEVELS, analyzeRiskSignals().
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 |
|---|---|---|---|
analyzeRiskSignals | function | function analyzeRiskSignals(input,{signals=[],levels=DEFAULT_LEVELS}={}) | input,{signals=[],levels=DEFAULT_LEVELS}={} |
DEFAULT_LEVELS | variable · value | variable DEFAULT_LEVELS | — |
| Callable | Kind | Exact public signature | Parameter syntax |
|---|---|---|---|
analyzeRiskSignals | exported-function | function analyzeRiskSignals(input,{signals=[],levels=DEFAULT_LEVELS}={}) | input,{signals=[],levels=DEFAULT_LEVELS}={} |
Parameter meanings and results
DEFAULT_LEVELS; analyzeRiskSignals(input,{signals:[{id,pattern,weight,label?,guidance?}],levels?}) returns mutable {level,matches,score,textLength} for the complete input.
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
- Normally none; malformed custom iterables/levels can produce standard JavaScript errors.
Availability and capabilities
Cross-host. Fully normalized.
None.
Contract example
import {analyzeRiskSignals} from '/arcane/modules/RiskSignalAnalyzer.js';
console.log(analyzeRiskSignals('Send a gift card now.', {
signals:[{id:'gift-card',pattern:/gift card/i,weight:40}]
}));
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.