@argantom/argantom
    Preparing search index...

    Class Ledger

    Structure that can merge record changes from another source.

    Index

    Constructors

    • Start blank.

      Parameters

      • id: string
      • unit: Unit
      • year: number
      • updatedCb: (ledgerId: string) => void

      Returns Ledger

    Methods

    • Create a new record.

      Parameters

      Returns string

    • Encode as a byte array.

      Returns Uint8Array<ArrayBuffer>

    • Get a record by id.

      Parameters

      • recordId: string

      Returns Record

    • List the records in this ledger. The ids will be sorted by record date with most recent records first.

      Returns string[]

    • Merge / decode an encoded byte array.

      Parameters

      • oth: Uint8Array

      Returns void

    • Total all income and expense in all records in this ledger.

      Returns Total

    • Get the unit used by this ledger.

      Returns Unit

    • Update a record.

      Parameters

      Returns void

    • Get the year used by this ledger.

      Returns number