Synchronous functions
Findings and ranges
Node.js uses camelCase fields. Findings includebyteRange, codepointRange,
and utf16Range. Use the UTF-16 range with native JavaScript string slicing.
FindingInput objects do not require utf16Range.
Asynchronous manager
UsePrivacyManager for provider-backed pseudonymization, tokenization, and
restoration:
Native distribution targets
The package build is configured for:- macOS x64 and Apple Silicon;
- Linux x64 and ARM64;
- Windows x64.
Errors
JavaScript operations throwDataFogError with stable code, optional
reason, optional RFC 6901 path, and optional findingIndex properties.
Structured JSON and PERSON fields
UsediscoverFields(data, config?), scanStructured(data, config?),
transformStructured(data, findings, config), and
scanAndTransformStructured(data, config). Scan returns { mappings, findings };
transformation returns { data, transformations }. Located findings contain
path and finding; located records contain path and transformation.
PrivacyManager adds asynchronous structured transform, scan-and-transform,
and restore methods with the same provider and scope contracts as text calls.
Paths are JSON Pointers. All ranges, including JavaScript UTF-16 ranges,
address the decoded string at that path. See person-field discovery
for aliases, policy configuration, input limits, and examples.