Skip to content

Documentation / @facturometro/einvoice / 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 ​

UncheckedDocument

Returns ​

UncheckedDocument

Example ​

ts
import type { Normalizer } from '@facturometro/validator';

const withProfile: Normalizer = (document) => ({ ...document, profileId: document.profileId ?? '...' });

MIT licensed. Specification artefacts belong to OpenPEPPOL, CEN and OASIS.