Skip to content

Documentation / @facturometro/einvoice / createDocumentView

Function: createDocumentView() ​

createDocumentView(document): DocumentView

Defined in: packages/validator/src/engine/view.ts:853

Creates the memoized view of a document.

Parameters ​

document ​

UncheckedDocument

An invoice or credit note of any family (canonical or unchecked).

Returns ​

DocumentView

The view.

Example ​

ts
import { createDocumentView } from '@facturometro/validator';

const view = createDocumentView(invoice);
view.lines().length; // 2

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