Skip to content

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

UncheckedDocument

Returns ​

UncheckedDocument

Example ​

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

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

MIT licensed. Specification material belongs to OpenPeppol, CEN and OASIS (see NOTICE). Peppol is a trademark of OpenPeppol AISBL; this project is not affiliated with it.