API ReferenceAnomaly Detection
LOCAL

engine.detect()

Executes the core algorithmic engine against a local array of records. Because this runs entirely in memory, you do not need to encrypt the payload before passing it to this function.

Function Parameters and Return Type

Parameters

datasetArray<Object>Required

An array of Javascript objects representing your rows. No encryption required; data remains in local heap.

options.anomalyTypeAnomalyType (enum)Required

Available values: HIGH_DENSITY, NCOA_MISMATCH, FUZZY_DUPLICATE

options.threadsnumber | 'auto'

Number of background workers to spawn. Defaults to single-threaded.

Return Object

The function returns synchronously (unless multithreaded) with the following structure:

statusstring

Returns SUCCESS.

anomalies_foundinteger

Total count of rows that failed the algorithmic proof.

execution_time_msnumber

Time taken to process the dataset locally.

flagsArray<Object>

Contains record_id, flag_reason, and severity.

Local JS Execution Sandbox
Node.js Input
typescript
1const data = [...]; // 10,000 rows
2
3const results = engine.detect(data, {
4 anomalyType: "HIGH_DENSITY"
5});
Local Output
Click "RUN LOCALLY" to execute WASM

Notice the incredible speed. By running this strictly on your local CPU without making network roundtrips, the algorithm executes in a fraction of a second.