@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

    • Encode as a byte array.

      Returns Uint8Array<ArrayBuffer>

    • Get the ID for this ledger.

      Returns string

    • 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
      • OptionalpublishUpdate: boolean

      Returns void

    • As a getter, get the current saved state. As a setter, set the current saved state.

      Parameters

      • Optionalsaved: boolean

      Returns boolean

    • Generate a user-friendly csv file from this ledger.

      Returns string

    • Get the year used by this ledger.

      Returns number

    • Construct a canonical ledger id by year and unit.

      Parameters

      • year: number
      • unit: Unit

      Returns string