Documentation / @facturometro/validator / Normalizer
Type Alias: Normalizer ​
Normalizer = (
document) =>UncheckedDocument
Defined in: packages/validator/src/rulesets/define.ts:42
The defaults hook of a ruleset: given a document, returns the document to validate.
Parameters ​
document ​
Returns ​
Example ​
ts
import type { Normalizer } from '@facturometro/validator';
const withProfile: Normalizer = (document) => ({ ...document, profileId: document.profileId ?? '...' });